Hi everyone,
I’m trying to write a script that will:
a) be fired by a keyboard shortcut
b) refresh the page of several browsers at once
In order to achieve a) I have installed Fastscripts Lite, so I can call the script no matter which application is currently active.
To achieve b) is a little harder. When I fire the script from the Script Editor it runs fine. When I try and run it via the shortcut, it flicks between the windows, makes a lot of event sounds, but doesn’t actually refresh any of the pages.
Any ideas what might be wrong? Here is the script:
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
keystroke "r" using {command down}
end tell
end tell
tell application "Firefox" to activate
tell application "System Events"
tell process "Firefox"
keystroke "r" using {command down}
end tell
end tell
tell application "Opera" to activate
tell application "System Events"
tell process "Opera"
keystroke "r" using {command down}
end tell
end tell
Model: Macbook 2007
AppleScript: 1.10.7
Browser: Firefox 3.0.9
Operating System: Mac OS X (10.4)