PDA

View Full Version : Use default browser in Apple script?


kelly001
June 8th, 2009, 10:29 PM
I have the following simple Apple Script but I'd like the default browser to open the URL and not specifically Safari. Any ideas?

Thanks!

tell application "Safari"
activate
do JavaScript "window.open('http://www.google.com')" in document 1
end tell

ElDiabloConCaca
June 9th, 2009, 09:27 AM
Howabout:


open location "http://www.google.com"


That should use the system's default browser.

kelly001
June 10th, 2009, 10:58 AM
Thanks a lot!