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 (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 want to do this to track application usage for statistical purposes for a product somewhat similar to Altiris's Application Metering on windows. How could i go about doing this? Also how could i deal with scenarios where there may be more than one foreground application such as if Spaces or Fast User Switching is enabled?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/ivan%40myrvold.org

This email sent to [EMAIL PROTECTED]


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to