Re: SystemStatusBar question
Re: SystemStatusBar question
- Subject: Re: SystemStatusBar question
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 08 Mar 2005 14:33:04 -0500
on 2005-03-08 12:10 PM, Finlay Dobbie at email@hidden wrote:
> On Tue, 8 Mar 2005 08:09:12 -0800, Vince Ackerman <email@hidden> wrote:
>> Is there anyway to get the StatusBarItem for the iChat Status Menu? If
>> you could, then you could check to see if the MenuItems change and get
>> the new item (ie available buddies ) that way....
>
> No, there isn't, and that sounds like a horrendous ugly hack of a way anyway.
>
> At this point in time, the only supported interface to iChat is that
> which it exposes via AppleScript. If you want a richer interface of
> some kind, you'll probably have to file an enhancement request with
> Apple.
Normally, there is a second supported interface to user controls: the
accessibility API, available since Jaguar. Apple's GUI Scripting technology
uses the accessibility API to allow AppleScript to get at pop-up buttons in
most applications, so you can read their current selection. With PreFab UI
Actions, you can even receive accessibility notifications to trigger your
own scripts when a selection in a menu button changes.
So I beg to differ when you say that his approach is a "horrendous ugly
hack". I wrote PreFab UI Actions to allow techniques like this to work, and
they do work in most applications.
Unfortunately, this menu button in iChat is invisible to the accessibility
API and GUI Scripting. It is apparently a custom control, rather than a
standard Cocoa or Carbon control, and Apple seems to have neglected to add
the few lines of code that would have made it accessible.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden