• 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: Any Way to Force an Idle Handler System Call? (Redux)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any Way to Force an Idle Handler System Call? (Redux)


  • Subject: Re: Any Way to Force an Idle Handler System Call? (Redux)
  • From: "koenig.yvan" <email@hidden>
  • Date: Sun, 08 Jun 2014 15:02:27 +0200


Le 08/06/2014 à 14:36, Shane Stanley <email@hidden> a écrit :

On 8 Jun 2014, at 10:30 pm, S. J. Cunningham <email@hidden> wrote:

What process name do you see in Activity Monitor?

"Idle App" of course :)

OK, we covered this in a thread here last week or so. One option was:

tell application "System Events" to set pid to unix id of process "Idle App"
do shell script "kill " & pid

But killall should work with the app name.


--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>


Hello Shane
It's not what I get.

With the application "taratata.app" running, I ran this script :

set theProcess to "taratata"
tell application "System Events"
set processNames to name of every process


end tell
if result contains theProcess then
try
do shell script "killall  " & theProcess
on error
tell application "System Events"
set pid to unix id of process theProcess
end tell
do shell script "kill " & pid
end try
end if


The event log was :

tell application "System Events"
get name of every process
--> {"loginwindow", "AppleScript Editor", "SystemUIServer", …"Activity Monitor", "taratata", "System Events", "com.apple.WebKit.WebContent"}
end tell
tell current application
do shell script "killall  taratata"
--> error "No matching processes belonging to you were found" number 1
end tell
tell application "System Events"
get unix id of process "taratata"
--> 2575
end tell
tell current application
do shell script "kill 2575"
--> ""
end tell

As you see, the killal command failed and the process was killed thru its pid.

Yvan KOENIG (VALLAURIS, France) dimanche 8 juin 2014 15:01:33






 _______________________________________________
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: Any Way to Force an Idle Handler System Call? (Redux) (From: Ted Wrigley <email@hidden>)
 >Re: Any Way to Force an Idle Handler System Call? (Redux) (From: "S. J. Cunningham" <email@hidden>)
 >Re: Any Way to Force an Idle Handler System Call? (Redux) (From: Shane Stanley <email@hidden>)
 >Re: Any Way to Force an Idle Handler System Call? (Redux) (From: "S. J. Cunningham" <email@hidden>)
 >Re: Any Way to Force an Idle Handler System Call? (Redux) (From: Shane Stanley <email@hidden>)
 >Re: Any Way to Force an Idle Handler System Call? (Redux) (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Any Way to Force an Idle Handler System Call? (Redux)
  • Next by Date: Re: Any Way to Force an Idle Handler System Call? (Redux)
  • Previous by thread: Re: Any Way to Force an Idle Handler System Call? (Redux)
  • Next by thread: Re: Any Way to Force an Idle Handler System Call? (Redux)
  • Index(es):
    • Date
    • Thread