Re: Killing an app on X
Re: Killing an app on X
- Subject: Re: Killing an app on X
- From: garbanzito <email@hidden>
- Date: Tue, 14 May 2002 16:51:28 -0600
at 2002 05 14, 15:26 -0700, they whom i call Jon Pugh wrote:
One of the boys here asked me how to kill an app with AppleScript on
X. I thought others might like to see how.
on forceQuit(appName)
set pid to word 1 of (do shell script ("ps -xo,pid,command | grep
\"" & appName & "\" | head -n 1"))
i suggest changing that to "ps -xwwo,pid,command ..." to
avoid a problem where commands with very long path names are
truncated, causing the grep to fail.
--
steve harley email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.