Hi everyone,

I'm slowly making friends with my macbook.  There are still a few issues
bugging me and was wondering if anyone else has found a solution?

I have both vmware (for running win xp) and emacs that pretty much need
to have voiceover turned off when they have focus as they are self voicing.

Now of course I can just hit command f5 to toggle VO on and off.
However that gets quite anoying when you are switching back and forth
between emacs, safari, vmware etc all the time.

It occurred to me that AppleScript may be the answer.  Now I'm pretty
new to all this stuff and to be honest have never written an appleScript
in my life.

So the reading that I have done suggests the following:

- Using the accessibility API (also called UI script) it should be
  possible.
- Somehow it should be possible to get system events to trigger the
  script when an app changes focus.

This is what I'm currently stuck on.  Finding a way to trigger a script
when an app gets focus.

My idea is this:
- trigger every time we change focus.
- Check the application name against a list of self voicing apps
e.g. emacs or vmware.
- If it matches, check if VO is on, if it is then turn off VO.
- If the app is not in the list, check if VO is on, if not then turn it
on.

All sounds pretty straight forward doesn't it :).  I'm sure it is or at
least might be if you knew what you were doing.

So after a few hours of googling and reading appleScript tutorials I'm
about done in for the night and have made no progress at all :(.

If anyone out there has already written something similar that they
would be willing to share, that would be awesome!  Even a few pointers
would be greatly appreciated.

Thanks for any advice.

Bart

-- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To post to this group, send email to macvisionaries@googlegroups.com.
To unsubscribe from this group, send email to 
macvisionaries+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/macvisionaries?hl=en.

Reply via email to