Tuesday, December 14, 2010

Reload the browser with AppleScript

This post is obsoleted, here is the new simplified version.

AppleScript is a weird language but you still can do cool things with it.

tell application "Google Chrome"
activate
end tell

tell application "System Events"
tell process "Google Chrome"
keystroke "r" using {command down}
end tell
end tell


Please feel free to replace "Google Chrome" with your choice.

https://github.com/yikulju/MacGyver/blob/master/reload-browser.applescript

No comments:

Post a Comment