• 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: List of open applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List of open applications


  • Subject: Re: List of open applications
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 05 Sep 2012 12:16:49 -0500

On Sep 5, 2012, at 11:48 AM, koenig.yvan wrote:

I just need to use killal aProcess
as a substitute to
tell application anApp to quit

because processes names aren't always matching applications ones.
For instance, the process for « openOffice » is « soffice »

I just experimented with that and got some failures, but then this worked ...

tell application "System Events"
unix id of application processes whose visible is true --> {133, 208, 212, 247, 255, 259, 267}
name of application processes whose visible is true --> {"Finder", "M_a_i_l_Monitor", "DragThing", "Smile", "Activity Monitor", "HardwareMonitor", "Mail"}
end tell

do shell script "kill 267" -- this kills Mail

The 'kill' command takes only the unix id, shown in Activity Monitor as 'PID'.
The two lists seem to be synchronized, so you can easily convert the name to its PID.


 _______________________________________________
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: 
 >List of open applications (From: "koenig.yvan" <email@hidden>)
 >Re: List of open applications (From: Axel Luttgens <email@hidden>)
 >Re: List of open applications (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: List of open applications
  • Next by Date: Re: List of open applications
  • Previous by thread: Re: List of open applications
  • Next by thread: Re: List of open applications
  • Index(es):
    • Date
    • Thread