Restart Django development server using AppleScript

/ Published in: AppleScript
Save to your folder(s)

Copy this code and paste it in your HTML
  1. property applicationName : "Terminal"
  2. tell application applicationName
  3. activate
  4. tell application "System Events"
  5. tell front window of process applicationName
  6. try
  7. key code 8 using control down
  8. keystroke "python runserver" & return
  9. on error theError
  10. display dialog ("Sorry, an error occured:" & theError) buttons "OK" default button "OK" with icon stop
  11. end try
  12. end tell
  13. end tell
  14. tell application "TextMate"
  15. activate
  16. end tell
  17. end tell

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.