Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Keyboard Viewer and Character Palette via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Keyboard Viewer and Character Palette via AppleScript
Authored by: robg on Jan 08, '12 08:03:31AM
It seems Apple somewhat fixed this in 10.7; I was able to make this script work with Butler to toggle the viewer via a keyboard shortcut. Note: This did not work in 10.6; it seems there are deeper issues there, and you'll need to use the above-linked Unix binary solution.
tell application "System Events"
  if exists (process "Keyboard Viewer") then
    tell application "KeyboardViewer" to quit
    delay 2
    tell application "KeyboardViewer" to activate
  else
    tell application "KeyboardViewer" to activate
  end if
end tell
Because of the delay, it will take a couple seconds for the viewer to appear if it's previously been launched. However, without the delay, the script didn't work for me.

cheers;
-rob.
---
Now: at Many Tricks, maker of useful apps
http://manytricks.com. Previously: founded this site.


[ Reply to This | # ]