Re: Obtaining the foreground application's path

2008-03-25 Thread Matt Burnett
Thanks everyone, the NSWorkspace class will most likely work for me. I remember seeing it years ago but havent had a need to use it untill now. If it turns out to be a computationally expensive method then I will give the carbon way a try. On Mar 25, 2008, at 9:11 AM, Jean-Daniel Dupas wrot

Re: Obtaining the foreground application's path

2008-03-25 Thread Jean-Daniel Dupas
And I know this is not what you ask for, but if you need to track application usage, I suggest you to have a look at thoses carbons events. kEventAppLaunched: kEventAppTerminated: kEventAppFrontSwitched: It may avoid you to check the frontmost application using a timer, or some other

Re: Obtaining the foreground application's path

2008-03-25 Thread Ivan C Myrvold
This will give you an NSDictionary with a lot of information about the active application: [[NSWorkspace sharedWorkspace] activeApplication]; Ivan Den 25. mars. 2008 kl. 08:12 skrev Matt Burnett: Im sure this is not the right list, but it is the closest one i could think of for this topic

Obtaining the foreground application's path

2008-03-25 Thread Matt Burnett
Im sure this is not the right list, but it is the closest one i could think of for this topic (or maybe carbon-dev). I am looking to obtain the current foreground application. The applications path, bundle identifier, or application name would be fine, however the path would be ideal. I wan