Re: AppleScript for menu bar items
- From: Jolly Roger <jollyroger@xxxxxxxxx>
- Date: Sat, 02 Feb 2008 02:48:20 -0600
In article <1iboczo.1ruqhz01we1mmzN%danspam@xxxxxxx>,
danspam@xxxxxxx (Daniel Cohen) wrote:
Jolly Roger <jollyroger@xxxxxxxxx> wrote:
In article <1ibn68c.1bxuq341vd0iv2N%danspam@xxxxxxx>,
danspam@xxxxxxx (Daniel Cohen) wrote:
Gregory Weston <uce@xxxxxxxxxx> wrote:
In article <1ibn2jw.pksqly5nm2uwN%danspam@xxxxxxx>,
danspam@xxxxxxx (Daniel Cohen) wrote:
I know how to write an AppleScript to call an item from one of the
menus
of an application.
But I would like the syntax for calling an item from a menu bar
button.
Can anyone supply that?
Can you explain further what you mean? I'm not sure what a "menu bar
button" is. Heck with "sure;" I don't even have a guess.
I thought that was the official name, but maybe I am wrong.
I mean the things that appear on the right of the menu bar, that don't
change according to the application you are in. For instance, Volume,
Airport, etc. (both Apple items and third-party ones).
Those are "menu extras". AppleScript doesn't have access to them
directly.
What are you wanting to accomplish?
There are two things I and someone else would find useful. One is to
turn something on remotely, when the only on-off setting is via the menu
extra, the other is a menu extra that I want to run at login time, but
switch from enabled to disabled. Both are menu choices from the relevant
menu extra, and not easily done by other means.
Unfortunately, you still haven't answered the question.
What do you want to turn on remotely?
And what do you want to run at login time?
AppleScript does allow access to ordinary menu items (the ones each
application has) although it is slightly complicated. So I assumed it
would also have access to the extras, although with a different syntax.
But maybe not.
Nope. And that's a hack Apple added to AppleScript. AppleScript was
never designed to be a system UI macro language.
Again, what are you actually trying to accomplish here? Forget menus
and so on - what is it you are actually trying to do?
--
Note: Please send all responses to the relevant news group. If you
must contact me through e-mail, let me know when you send email to
this address so that your email doesn't get eaten by my SPAM filter.
JR
.
- Follow-Ups:
- Re: AppleScript for menu bar items
- From: Daniel Cohen
- Re: AppleScript for menu bar items
- References:
- AppleScript for menu bar items
- From: Daniel Cohen
- Re: AppleScript for menu bar items
- From: Gregory Weston
- Re: AppleScript for menu bar items
- From: Daniel Cohen
- Re: AppleScript for menu bar items
- From: Jolly Roger
- Re: AppleScript for menu bar items
- From: Daniel Cohen
- AppleScript for menu bar items
- Prev by Date: Re: AppleScript for menu bar items
- Next by Date: Re: Mail folders
- Previous by thread: Re: AppleScript for menu bar items
- Next by thread: Re: AppleScript for menu bar items
- Index(es):
Relevant Pages
|