Re: Add dock menu to an AS app in OS X
Re: Add dock menu to an AS app in OS X
- Subject: Re: Add dock menu to an AS app in OS X
- From: Christopher Nebel <email@hidden>
- Date: Tue, 15 Jan 2002 11:52:31 -0800
On Monday, January 14, 2002, at 02:42 PM, Greg Welch wrote:
This must be a rudimentary question, but I can't find an answer
anywhere on the web, etc.
I have an OS X applescript that I run as an application (stay open). I
would like to allow the user to right-click on the application icon in
the dock, and to see some custom menu items (linked to my own handlers
of course) besides "Show In Finder" and "Quit."
Anyone aware of a way to do this in OS X, w/ plain-old-scripting, or do
I need to break down and learn to use AppleScript Studio?
It would be nice if this were easy, but unfortunately it isn't. There's
no way to customize your Dock menu from a plain applet, and even doing
it in Studio will be difficult. Studio doesn't have any direct access
to the Dock menu APIs (though you can always use "call method" as an
escape hatch), and it doesn't have any way to associate a script or
handler with a menu item at run time. The latter is a planned feature;
I've filed an enhancement request on the former.
--Chris Nebel
AppleScript Engineering