Created
September 1, 2009 01:40
-
-
Save jamesmartin/178829 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AppleScript to reset safari. | |
# Originally found at http://macscripter.net/viewtopic.php?id=30178&action=new | |
tell application "Safari" to set ResetSafari_loc to localized string "Reset Safari…" | |
if ResetSafari_loc ends with "…" then | |
set ResetSafari_loc to text 1 thru -2 of ResetSafari_loc | |
else if ResetSafari_loc ends with "..." then | |
set ResetSafari_loc to text 1 thru -4 of ResetSafari_loc | |
end if | |
activate application "Safari" | |
tell application "System Events" to tell process "Safari" | |
tell menu bar 1 | |
tell menu bar item "Safari" to tell menu 1 (* EDITED *) | |
-- get name of every menu item | |
click menu item 9 | |
end tell | |
end tell | |
repeat until exists window ResetSafari_loc | |
delay 0.2 | |
end repeat | |
tell window ResetSafari_loc | |
click button 1 | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment