Last active
March 7, 2024 19:25
-
-
Save scottlee/539754825b536747dba1 to your computer and use it in GitHub Desktop.
Applescript for reloading a browser in the background. Useful when paired up with an Automator application and PhpStorm external tool shortcut.
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
# Choose your browser: | |
# Chrome | |
# tell application "Google Chrome" | |
# reload active tab of (get window 1) | |
# end tell | |
# | |
# # Safari | |
# tell application "Safari" | |
# tell window 1 | |
# do JavaScript "window.location.reload(true)" in current tab | |
# end tell | |
# end tell | |
# | |
# # Firefox | |
# # Firefox doesn't support the Apple do JavaScript call. | |
# tell application "Firefox" | |
# activate | |
# end tell | |
# | |
# tell application "System Events" | |
# tell process "Firefox" | |
# keystroke "r" using {command down} | |
# end tell | |
# end tell | |
# | |
# tell application "PhpStorm" | |
# activate | |
# end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment