Re: Get ProcessSerialNumber of last front application

2011-02-11 Thread Mr. Gecko
:55 PM, Matt Neuburg wrote: On Wed, 9 Feb 2011 09:23:45 -0600, Mr. Gecko grmrge...@gmail.com said: 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. You

Re: Get ProcessSerialNumber of last front application

2011-02-11 Thread Jean-Daniel Dupas
mac and I don't like things that slow me down. My big guess is number 2. On Feb 9, 2011, at 12:55 PM, Matt Neuburg wrote: On Wed, 9 Feb 2011 09:23:45 -0600, Mr. Gecko grmrge...@gmail.com said: Hello, I am wondering how I can get the last front application ProcessSerialNumber so I can use

Re: Get ProcessSerialNumber of last front application

2011-02-11 Thread Mr. Gecko
Thanks, I'm working out the code now and if it will compile on 64bit, then I'll use it. On Feb 11, 2011, at 10:15 AM, Jean-Daniel Dupas wrote: Does your application compile on 64 bits ? Do you get a deprecation warning when using required functions ? When the answer is no for both

Get ProcessSerialNumber of last front application

2011-02-09 Thread 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

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Dave DeLong
Alternative: instead of bringing another process forwards, tell yours to hide. Then the previously-frontmost app will be frontmost again. Dave Sent from my iPhone On Feb 9, 2011, at 7:23 AM, Mr. Gecko grmrge...@gmail.com wrote: Hello, I am wondering how I can get the last front application

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Mr. Gecko
I guess I can do that. I'll give it a try. On Feb 9, 2011, at 10:21 AM, Dave DeLong wrote: Alternative: instead of bringing another process forwards, tell yours to hide. Then the previously-frontmost app will be frontmost again. Dave Sent from my iPhone smime.p7s Description: S/MIME

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Peter Lübke
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

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Mr. Gecko
I'm looking for the process that was front before my application became front. I was thinking in getting the process as this is what I did in my menubar applications and I just stole code from them. I can do as Dave DeLong said and hide the application using [[NSApplication sharedApplication]

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Matt Neuburg
On Wed, 9 Feb 2011 09:23:45 -0600, Mr. Gecko grmrge...@gmail.com said: 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. You can track applications as they come

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Mr. Gecko
said: 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. You can track applications as they come to the front using Carbon Events. http

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Jean-Daniel Dupas
that slow me down. My big guess is number 2. On Feb 9, 2011, at 12:55 PM, Matt Neuburg wrote: On Wed, 9 Feb 2011 09:23:45 -0600, Mr. Gecko grmrge...@gmail.com said: Hello, I am wondering how I can get the last front application ProcessSerialNumber so I can use SetFrontProcess to bring

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Mark Munz
In 10.6 or later, if you do need to know when apps are being activated, you can also uses the NSWorkspace notificationCenter and observe NSWorkspaceDidActivateApplicationNotification with something like this: [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self

Re: Get ProcessSerialNumber of last front application

2011-02-09 Thread Matt Neuburg
, 2011, at 12:55 PM, Matt Neuburg wrote: On Wed, 9 Feb 2011 09:23:45 -0600, Mr. Gecko grmrge...@gmail.com said: 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