• 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
Capture highlighted menu name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Capture highlighted menu name


  • Subject: Capture highlighted menu name
  • From: Cauvery K <email@hidden>
  • Date: Tue, 17 Feb 2009 17:17:47 +0530

Hello All,

I'm developing an app and want to capture menu title (from main menu bar and status menu bar)along with selected menu window. So far i'm able to capture the selected menu window but couldn't quite figure out how to capture the menu title.

Method that I tried to capture menu title is:
1. Capture the entire desktop as an image on selecting a menu .
2. From the image, read the color value from the pixels just above the selected menu window, comparing it with the color value from next pixel along the width of the menu bar.
3. If the color matches or if the difference between the colors is marginally very less then repeat step 2 incrementing a counter to keep track of no. of pixels scanned.
4. capture the menu title considering counter value as the menu title length.
But this method results in partial or no menu title being captured since the color components vary due the gradient effect of menu bar color.


Am I missing anything here? If anybody in this mailing list has tried out something similar to what I'm trying to achieve your inputs are much appreciated.

Thanks in advance.
Cauvery



_______________________________________________

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: Capture highlighted menu name
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: What is a CALayer?
  • Next by Date: Adding Multiple NSWindow or NSPanel into another NSWindow
  • Previous by thread: Re: What is a CALayer?
  • Next by thread: Re: Capture highlighted menu name
  • Index(es):
    • Date
    • Thread