Re: Activate a script when an application changes focus
Re: Activate a script when an application changes focus
- Subject: Re: Activate a script when an application changes focus
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 12 Apr 2011 05:46:35 -0400
On Apr 12, 2011, at 12:47 AM, Bart Bunting wrote:
> What I want to have happen is:
>
> Application gets focus.
> - Check if it is either emacs or vmware. If so turn off voiceover.
> - If it is not then make sure voiceover is turned on.
>
> Can anyone give me some pointers how to achieve this?
Try my UI Actions product. You can download a 30-day free trial here: <http://pfiddlesoft.com/uiactions/>.
UI Actions is based on the Accessibility API. You "attach" any AppleScript script to any target application, then choose an Accessibility notification to trigger the script. Available notifications include 'application activated' and 'application deactivated'. I haven't tested it with VoiceOver or VMWare, but if they are applications they ought to work and do exactly what you're asking.
If you want to write your own UI Actions lookalike, you can write an Objective-C Cocoa program and use the C-based Accessibility API. Documentation on writing "assistive" applications is available from Apple, along with sample code. Join Apple's accessibility-dev mailing list and read its archives for more information.
--
Bill Cheeseman - email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden