Skip to content

Instantly share code, notes, and snippets.

@jhickner
Created November 15, 2012 22:37
Show Gist options
  • Select an option

  • Save jhickner/4081943 to your computer and use it in GitHub Desktop.

Select an option

Save jhickner/4081943 to your computer and use it in GitHub Desktop.

Revisions

  1. jhickner created this gist Nov 15, 2012.
    16 changes: 16 additions & 0 deletions reload_chrome.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #!/bin/sh
    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"
    activate
    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