Do you find yourself switching between different languages several times a day? I myself switch between English and Swedish on daily basis, when writing mails, coding etc. Since I use OS X, I try to use the built in dictionary so that I avoid misspellings.

So, how do you go about to change the dictionary currently in use? Simply invoke the Edit menu item, and then find Spelling and Grammar. In its submenu, invoke Show Spelling and Grammar (for those of you who prefer to use the keyboard, just press Cmd + :). A floating window appears, but note that it does not have focus. Neither can you give it focus by invoking Expose, or by flipping through the active application’s windows. Your only choice left… the mouse?

No, you can actually perform one more nifty trick with your keyboard. In System Preferences, under Keyboard & Mouse you’ll find Keyboard Shorcuts. In there, look for Move focus to the floating window. By default, it has a keyboard shortcut of Ctrl + F6. Try invoking it and you’ll se that the current application’s floating window will gain focus.

So, to switch the current language used by the dictionary:

  • Open up Spelling and Grammar by pressing Cmd + :
  • Give it focus by pressing Ctrl + F6
  • Tab around in the window to change the parameters you like
Since the above method is time consuming I thought I’d write a simple AppleScript that does all those things for me. But… it seems I’m not competent enough to figure out how to find floating windows using System Events - is it even possible? If you have some spare time, write me such a script and you’ll make my day. Now go play with those keyboard shortcuts!