Skip to content

Instantly share code, notes, and snippets.

@jsejcksn
Last active September 20, 2015 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsejcksn/e07bbf7a4344fa5443cc to your computer and use it in GitHub Desktop.
Save jsejcksn/e07bbf7a4344fa5443cc to your computer and use it in GitHub Desktop.
AppleScript Snippets
(*
Tested on OS X 10.10
*)
tell application "Terminal"
activate
do script "rsync -aEh --delete --exclude=PATTERN --progress '/path/to/source' '/path/to/destination'"
end tell
repeat 1 times
tell application "Sublime Text" to activate
delay 0.2
tell application "System Events"
keystroke "g" using command down
key code 124 using {command down, shift down}
key code 124 using shift down
keystroke "x" using command down
key code 125
keystroke "v" using command down
end tell
end repeat
tell application "Script Editor" to activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment