• 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
Re: Show the dock icon's context menu:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Show the dock icon's context menu:


  • Subject: Re: Show the dock icon's context menu:
  • From: Michael Ash <email@hidden>
  • Date: Mon, 22 Jun 2009 00:14:08 -0400

On Sun, Jun 21, 2009 at 9:19 PM, Uli
Kusterer<email@hidden> wrote:
> Am 22.06.2009 um 02:46 schrieb Andrew Farmer:
>>
>> And how would you propose to do that? AppleScript isn't magic (sadly). It
>> can't do anything that you can't do from code already.
>
> Look at the docs. AppleScript supports "GUI scripting", which is a layer
> above the accessibility APIs and some other related things that lets you
> determine dimensions of onscreen items, simulate clicks in them etc.
>
> So, you *can* do all of that in code, but in this case putting up with AS's
> broken syntax is probably a better option than trying to do the right thing
> yourself.

The thing is, AS GUI Scripting is never "the right thing". It's a
kludge and a hack pretty much by definition.

You can accomplish the same stuff by using the Accessibility API
directly. It will boil down to "figure out where the thing is, and
fake a mouse click there". This will work in a pinch but it's not
something you'd ever want to ship.

(Actually, popping up an app's Dock menu programmatically is probably
not something you'd ever want to ship no matter how you do it. If the
user wants that menu, he can click on the icon himself.)

Mike
_______________________________________________

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

References: 
 >Re: Show the dock icon's context menu: (From: Ian was here <email@hidden>)
 >Re: Show the dock icon's context menu: (From: Andrew Farmer <email@hidden>)
 >Re: Show the dock icon's context menu: (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Approaches for this Matching Problem?
  • Next by Date: Re: How to fill rectangle under vertical scroller?
  • Previous by thread: Re: Show the dock icon's context menu:
  • Next by thread: Core Data Persistent Store Corrupted
  • Index(es):
    • Date
    • Thread