Skip to content

Instantly share code, notes, and snippets.

@geddski
Last active January 2, 2016 08:39
Show Gist options
  • Save geddski/8277426 to your computer and use it in GitHub Desktop.
Save geddski/8277426 to your computer and use it in GitHub Desktop.
like live reload only you kick it off when you're ready.
tell application "System Events"
keystroke "s" using command down
end tell
tell application "Google Chrome" to tell the first «class CrTb» of its first window
«event CrSuRlod»
end tell
tell application "Google Chrome" to set «class acTI» of first window to 1
@jargv
Copy link

jargv commented Jan 6, 2014

Nice! Thanks dave. I got it working in vim with vim's autocommands. When I save vim kicks off the script (when it's on)

@jargv
Copy link

jargv commented Jan 6, 2014

Also you can make the script a bit more unixy (read: sexy) by putting:

#!/usr/bin/osascript

at the top. Then do

chmod +x reloadscript 

Then you can just run execute the file! Yay Unix!

./reloadscript
#or if it's in your path
reloadscript

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