Re: Show the dock icon's context menu:
On 19 Jun 2009, at 16:37, Ian was here wrote: I think the best way to show an application dock icon's context menu from within the application itself is to write an AppleScript that can find the desired application's dock icon, then ask it to show its context menu. 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. ___ 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 arch...@mail-archive.com
Re: Show the dock icon's context menu:
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. Cheers, -- Uli Kusterer The Witnesses of TeachText are everywhere... http://www.zathras.de ___ 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 arch...@mail-archive.com
Re: Show the dock icon's context menu:
On Sun, Jun 21, 2009 at 9:19 PM, Uli Kustererwitness.of.teacht...@gmx.net 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 (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 arch...@mail-archive.com
Re: Show the dock icon's context menu:
I think the best way to show an application dock icon's context menu from within the application itself is to write an AppleScript that can find the desired application's dock icon, then ask it to show its context menu. ___ 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 arch...@mail-archive.com
Show the dock icon's context menu
I've googled the heck out of this thing, but came up empty handed. Does anyone know how to make the context menu for the running application's dock icon pop up? ___ 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 arch...@mail-archive.com
Re: Show the dock icon's context menu
Right-click on it, control click on it, or regular-click on it and hold the button down for a few seconds. On Fri, Jun 12, 2009 at 2:33 PM, Ian was herehowlew...@yahoo.com wrote: I've googled the heck out of this thing, but came up empty handed. Does anyone know how to make the context menu for the running application's dock icon pop up? ___ 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/clarkcox3%40gmail.com This email sent to clarkc...@gmail.com -- Clark S. Cox III clarkc...@gmail.com ___ 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 arch...@mail-archive.com
Re: Show the dock icon's context menu
Maybe we should assume that the goal is to display it programmatically? I've also wanted to do this and haven't found a way — in one application, having a left click on the Dock icon show the menu would have been particularly useful. On Fri, Jun 12, 2009 at 5:53 PM, Clark Coxclarkc...@gmail.com wrote: Right-click on it, control click on it, or regular-click on it and hold the button down for a few seconds. On Fri, Jun 12, 2009 at 2:33 PM, Ian was herehowlew...@yahoo.com wrote: I've googled the heck out of this thing, but came up empty handed. Does anyone know how to make the context menu for the running application's dock icon pop up? ___ 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/clarkcox3%40gmail.com This email sent to clarkc...@gmail.com -- Clark S. Cox III clarkc...@gmail.com ___ 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/s%40sidneysm.com This email sent to s...@sidneysm.com ___ 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 arch...@mail-archive.com
Re: Show the dock icon's context menu
Short of simulating a mouse click on the appropriate spot, I don't think this can be done. Finding what that spot is would also be difficult; you *may* be able to use the accessibility APIs to accomplish this, but that would, of course, require that the user had enabled accessibility. On Fri, Jun 12, 2009 at 3:50 PM, Sidney San Martíns...@sidneysm.com wrote: Maybe we should assume that the goal is to display it programmatically? I've also wanted to do this and haven't found a way — in one application, having a left click on the Dock icon show the menu would have been particularly useful. On Fri, Jun 12, 2009 at 5:53 PM, Clark Coxclarkc...@gmail.com wrote: Right-click on it, control click on it, or regular-click on it and hold the button down for a few seconds. On Fri, Jun 12, 2009 at 2:33 PM, Ian was herehowlew...@yahoo.com wrote: I've googled the heck out of this thing, but came up empty handed. Does anyone know how to make the context menu for the running application's dock icon pop up? -- Clark S. Cox III clarkc...@gmail.com ___ 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 arch...@mail-archive.com