Re: Get ProcessSerialNumber of last front application
Re: Get ProcessSerialNumber of last front application
- Subject: Re: Get ProcessSerialNumber of last front application
- From: Peter Lübke <email@hidden>
- Date: Wed, 9 Feb 2011 17:33:00 +0100
GetNextProcess() doesn't reflect the order in which processes were
made front, as the Process Manager doc says:
"Note that the order of the list of processes is internal to the
Process Manager"
which *seems* to be the order in which processes register with
Process Manager; if this is true (I don't know whether you can rely
on it), you could at least use GetNextProcess() to track the
(backwards) order in which processes registered with process manager.
An easy way to look at this is an AppleScript:
tell application "System Events"
name of every process
end tell
I don't quite understand the scenario though: are you looking for the
process that was front before the user launched your application?
Cheers
-Peter
Am 09.02.2011 um 16:23 schrieb Mr. Gecko:
Hello, I am wondering how I can get the last front application
ProcessSerialNumber so I can use SetFrontProcess to bring it back
to front after they close the window to my application. My
application is a UIAgent so it doesn't have a dock icon and I am
thinking that the user would like it more if when they close the
window to my application it will make the previous application so
it's front. The way they open my window is by opening the
application via the finder or dock (if they have it in the dock).
My application runs in the background to keep track of things and I
know my customers would not want a menubar icon as I don't want one
as well. I know there is GetFrontProcess, but that is useless when
the application becomes front before I call it due to them opening
it in the finder and GetNextProcess gets Quick Look Helper.
I hope I explained things well, thanks for any help.
Mr. Gecko_______________________________________________
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden