View Full Version : Extra Window Opens in Browser

Feb 5, 2009, 11:20 AM
Here is probably a dumb question. The script I have below works. It just opens my URL in a new window of Safari instead of loading it into the default window when Safari Opens. How do I resolve this?

set theURL to "http://www.mywebsite.com"
tell application "safari"
open location theURL
end tell

Feb 5, 2009, 11:41 AM
Try this:set theURL to "http://www.mywebsite.com"
tell application "Safari"
set URL of document 0 to theURL
end tell