• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Killing an appleScript applet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Killing an appleScript applet


  • Subject: Re: Killing an appleScript applet
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 30 May 2014 14:53:12 -0500

On May 30, 2014, at 2:21 PM, Stockly, Ed wrote:

set appletName to "RunningScript"
tell application "System Events" to set PID to unix id of process appletName

--That works, but only if you leave off the ".app" extension. I wonder if
it's any faster than using the shell to get a list and stepping through the
list?

do shell script "killall " & appletName

--No matching processes belonging to you were found

I tried several variations of this before going sending my question. Doesn't
work with our without the ".app" extension.

I have used this handler for years without a problem in OS X up to and including 10.8.

on killBusy()
-- this handler kills the application "displayBusy"
try
tell application "System Events"
if exists application process "displayBusy" then
(unix id of application process "displayBusy")
else
return false
end if
end tell
do shell script "kill " & the result
end try
return true
end killBusy --------------------------------------------------



 _______________________________________________
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

References: 
 >Re: Killing an appleScript applet (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Killing an appleScript applet
  • Next by Date: Re: Killing an appleScript applet
  • Previous by thread: Re: Killing an appleScript applet
  • Next by thread: Re: Killing an appleScript applet
  • Index(es):
    • Date
    • Thread