Skip to content

Instantly share code, notes, and snippets.

@yimajo
Created June 14, 2012 07:09
Show Gist options
  • Save yimajo/2928598 to your computer and use it in GitHub Desktop.
Save yimajo/2928598 to your computer and use it in GitHub Desktop.
RebootXCode
say "Reboot! XCode"
set aWorkflow to "/Users/yimajo/Documents/work/Dropbox/Automator/RebootXCode.workflow"
set aRes to executeAutomatorWorkflow(aWorkflow) of me
on executeAutomatorWorkflow(aWorkflow)
set aShell to "/usr/bin/automator " & (quoted form of POSIX path of aWorkflow)
with timeout of 3600 seconds
try
set aRes to (do shell script aShell)
on error errorMes
return errorMes
end try
end timeout
return aRes
end executeAutomatorWorkflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment