Keyboard Viewer and Character Palette via AppleScript

Oct 27, '05 05:38:00AM

Contributed by: JazzJoey

If you don't like using the Input Menu (System Preferences: International: Input Menu tab) to activate the Keyboard Viewer and Character Palette, here are two AppleScripts that do the same thing:

Keyboard Viewer: Get this script

tell application "Finder"
open item "System:Library:Components:KeyboardViewer.component:
 Contents:SharedSupport:KeyboardViewerServer.app" of the startup disk
end tell
Character Palette: Get this script
tell application "Finder"
open item "System:Library:Components:CharacterPalette.component:
 Contents:SharedSupport:CharPaletteServer" of the startup disk
end tell
Once the scripts are created, you can put them in your Dock, Sidebar, assign a hot key (via your favorite third-party tool), etc.

[robg adds: Please note that in the displayed code for both scripts, the open item line has been broken in two (for a narrower display here) just after component: bit. Remove the line break (and extra spaces) when creating the scripts, or they won't work properly. The easiest thing to do, though, is just click the "Get this script" link for each script to open it directly in your copy of Script Editor.]

Comments (24)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20051022020253863