Need help by people experienced with AppleScript!

Joined
Jul 18, 2009
Messages
1
Reaction score
0
Points
1
I need a script for AppleScript that makes Safari load a specified web page once every 30 minutes, in separate windows. I've got this so far:

Code:
open_safari_window("http://www.apple.com")

on open_safari_window(my_url)
	tell application "Safari"
		repeat with i from 1 to 10
			# wake up safari
                        activate
			
			# make a new window
			make new document at end of documents
			
                        # set the URL of this new window
			tell document i
				set URL to my_url
			end tell

                        # sleep 1800 seconds (30 minutes)
			delay 1800
		end repeat
	end tell
end open_safari_window

But it doesn't let me compile it. Anybody got any tips?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top