Poll Processes For Menu Bar Items?
Poll Processes For Menu Bar Items?
- Subject: Poll Processes For Menu Bar Items?
- From: "Chunk 1978" <email@hidden>
- Date: Thu, 15 Jan 2009 13:44:22 -0500
i'm trying to poll the active processes for menu bar items (Volume,
Date & Time, etc.) but the NSDictionary key
@"NSApplicationBundleIdentifier" doesn't seem to recognize the bundle
identifier for them.
-=-=-=-
//Poll Processes
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
NSArray *runningAppDictionaries = [ws launchedApplications];
NSDictionary *aDictionary;
for (aDictionary in runningAppDictionaries)
{
//If Volume Menu Item is active
if ([[aDictionary valueForKey:@"NSApplicationBundleIdentifier"]
isEqualToString:@"com.apple.menuextra.volume"])
{
NSLog(@"Volume Menu Active");
return;
break;
}
}
NSLog(@"Volume Menu Not Active");
-=-=-=-
_______________________________________________
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