Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thriftinkid

macrumors regular
Original poster
Mar 24, 2008
119
0
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?
Code:
set theURL to "http://www.mywebsite.com"
tell application "safari"
open location theURL
end tell
 
Try this:
Code:
set theURL to "http://www.mywebsite.com"
tell application "Safari"
    set URL of document 0 to theURL
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.