Re: list of (non-background) processes
Re: list of (non-background) processes
- Subject: Re: list of (non-background) processes
- From: Adam Hinshaw <email@hidden>
- Date: Sun, 13 Apr 2003 20:41:16 +1000
just replying to my own post from last week.
i ended up finding a simplistic way to do this and thought some one else may
find it useful.
-------------
tell application "System Events"
tell process "Dock" to set dockStuff to title of every UI element
set runningApps to {}
set procs to the title of application processes
repeat with curApp in dockStuff
if curApp is in procs then
set runningApps to runningApps & curApp
end if
end repeat
end tell
return runningApps
-------------
Bit dodgy, i know and dependent on Apple not alter the System Events beta
and the Dock too much, but hey it works now :)
If any one could be bothered to try this out and let me know if it fails i'd
appreciate it.
im targeting osx 10.2+ with the system events beta.
thanks
.adam
on 9/4/03 11:31 PM, Adam Hinshaw at email@hidden wrote:
>
hi.
>
>
im trying to get a list of the current running processes on OSX (10.2+).
>
>
the trick is i'm after those non background-only apps, i guess its the
>
equivalent to what the dock shows as running apps.
>
>
so 'tell application "System Events" to get the application processes' wont
>
cut it. I've tried a couple of filtering attempts with System Events but
>
can't find a consistent set of properties that will give the background-only
>
kind of test im after. (Using the new UI beta version + also tried with the
>
old one)
>
>
Any one have any ideas ?
>
>
im happy for a do shell script based approach.
>
>
thanks
>
adam.
>
_______________________________________________
>
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.
_______________________________________________
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.