Re: Killing an appleScript applet
Re: Killing an appleScript applet
- Subject: Re: Killing an appleScript applet
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 29 May 2014 20:11:18 +0000
- Thread-topic: Killing an appleScript applet
Title: Re: Killing an appleScript applet
Thanks, Guys, this works like a charm!
ES
_______
set
appletName
to "RunningScript.app"
set
processToKill
to ""
set
processList
to
do shell script "ps -x"
repeat
with
thisProcess
in
paragraphs
of
processList
if
thisProcess
contains
appletName
then
set
processToKill
to
thisProcess
as
text
set
PID
to
word
1
of
processToKill
do shell script "kill
" & PID
exit
repeat
end
if
end repeat
set
newProcessList
to
do shell script "ps -x"
return {processToKill,
processList,
newProcessList}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden