Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Reload Chrome then refocus iTerm
exec <"$0" || exit; read v; read v; exec /usr/bin/osascript - "$@"; exit
-- the above is some shell trickery that lets us write the rest of
-- the file in plain applescript
tell application "Google Chrome"
tell application "System Events"
tell process "Google Chrome"
keystroke "r" using {command down, shift down}
end tell
end tell
end tell
tell application "iTerm" to activate

dennschu commented Sep 3, 2014

I have extended your script with params for app name and delay (that solves issues with PhpStorm, when used as external tool with keyboard shortcut) see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment