Source Code : 
property applicationName "Terminal"
tell application applicationName
    activate
    tell application 
"System Events"
        
tell front window of process applicationName
            
try
                
key code 8 using control down
                keystroke 
"python manage.py runserver" & return
            
on error theError
                display dialog 
("Sorry, an error occured:" theErrorbuttons "OK" default button "OK" with icon stop
            end 
try
        
end tell
    end tell

[Login or Register to remove this advertisement]

    tell application 
"TextMate"
        
activate
    end tell
end tell 
Xcode Reviewed by Xcode on . Restart Django development server using AppleScript property applicationName : "Terminal" tell application applicationName activate tell application "System Events" tell front window of process applicationName try key code 8 using control down keystroke "python manage.py runserver" & return on error theError display dialog ("Sorry, an error occured:" & theError) buttons "OK" default button "OK" with icon stop Rating: 5