Trying to hide the address bar on Safari using Applescript or Javascript
I am writing a web-based app that needs to launch a browser window from an applescript file. (the pc side uses a .vbs file to do the same thing.)
I can do it with applescript and "System Events" :
tell application "Safari"
activate
make new document with properties {URL:"http://IPADDRESS/default.aspx"}
do JavaScript ("self.resizeTo(500,480);") in document 1
tell application "System Events"
keystroke "B" using {command down, shift down}
keystroke "/" using command down
keystroke "|" using command down
end tell
end tell
But this affects the entire Safari application so new windows opened by the user appear the same way. I need it to only affect the window that is opened. I tried some JS "toolbar=no" type commands but it did not have any effect. I must admit my JS and AS is very basic at this point so it could have been poor syntax..
Can any of you fine folks suggest a way to do this?
Macs, macs and more macs...oh yeah. Linux too., Mac OS X (10.5.7), Safari 3 and 4 Beta.