• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Poll Processes For Menu Bar Items?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Poll Processes For Menu Bar Items?
      • From: Benjamin Dobson <email@hidden>
  • Prev by Date: Can dirhelper delete files in NSTemporaryDirectory() while app is running?
  • Next by Date: Re: Constructing class names dynamically
  • Previous by thread: Re: Can dirhelper delete files in NSTemporaryDirectory() while app is running?
  • Next by thread: Re: Poll Processes For Menu Bar Items?
  • Index(es):
    • Date
    • Thread