Return to Snippet

Revision: 28224
at July 4, 2010 05:26 by iloveitaly

Initial Code
-- this function quits the app based on its process name, NOT its application name
-- based on code here:
-- we need to use the pid, none of the AE apis returned the right name for "tell application x to quit"

on quit_app(process_name)
	if app_is_running(process_name) then
		tell application "System Events"
			set appID to unix id of application process process_name
		end tell
		do shell script "kill " & appID
	end if
end quit_app

Initial URL

Initial Description

Initial Title
Quit Application by Process Name

Initial Tags

Initial Language