Safari question

Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
Is there any way to set Safari to periodically autorefresh? For instance, say you've got a page that you're expecting to be updated and you want to see it as soon as possible. Is it possible to make Safari automatically refresh, say, every minute?
 
Joined
Apr 28, 2006
Messages
2,542
Reaction score
79
Points
48
Your Mac's Specs
iMac Core Duo 20", iBook G4, iPhone 8GB :)
Code:
on idle
-- the applescript only calls attention to itself when the idle period is up

tell application "Safari"
--confirms your browser is the front application
		activate
	end tell
	
	tell application "System Events"
		tell process "Safari"
			keystroke "r" using {command down}
		end tell
	end tell
--sets the idle period in seconds. i.e. safari will refresh every 10 seconds
	return 10
end idle

This applescript refreshes like you said... edit the seconds and such to whatever you want it to be.
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
Sorry if this is a stupid question, but what do I do with that? LOL
 
Joined
Apr 28, 2006
Messages
2,542
Reaction score
79
Points
48
Your Mac's Specs
iMac Core Duo 20", iBook G4, iPhone 8GB :)
Oops! Forgot about you.

Here's how you use applescript.

Open your script editor (Applications > Applescript > Script Editor). If it's not there you might have to install it from the OS X install DVD disc 2.

Paste that stuff in there. Edit those seconds to whatever you want them to be.

Then save it as a script (.SCPT) and run it. I'm not sure if you can run this one independently or from within safari, but I will check and let you know. I don't have my mac at the moment so...
 

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