Hi Alex,
Assigning an AppleScript to a keyboard shortcut, works the same way
that any menu command can be assigned to a shortcut: you use the
"Keyboard Shortcuts" tab after selecting "Keyboard & Mouse" under
System Preferences, navigate (VO-Right Arrow) past the table to the
"+" button, press it (VO-space), and specify the name of the menu
command or AppleScript and the desired shortcut sequence after
selecting the application for which it is used in the popup menu bar.
The application for which you make the shortcut key assignment must be
closed at the time you do this. There are also a great many shortcut
definitions (some used by Mac OS X), so it is a good idea to check out
your combination before making the assignment, and it is also a good
idea not to define these for "All Applications" unless you really need
this feature. (In this case you will need to restart your computer
before the shortcut assignment takes effect).
For a complete example of how a keyboard shortcut is assigned to an
AppleScript, see my post in the archives:
http://www.mail-archive.com/[email protected]/msg33347.html
This was an answer to a query about how to jump to specific time in
iTunes where I pointed the user to the "RestartAt" AppleScript at Tim
Kilburn's VoiceOver Downloads pages and then provided details on how
to assign it to a keyboard shortcut.
Anne also gave great directions for how to assign a keyboard shortcut
for Hang Up in Skype that illustrates the same process (and you don't
have to read through my detailed description of how the "RestartAt"
AppleScript works -- you can just read the instructions for assigning
it to a keyboard shortcut). I'm including my added comments to Anne's
post that explain why applications must be closed when you make
shortcut assignments in this archived link:
http://www.mail-archive.com/[email protected]/msg46141.html
HTH
Cheers,
Esther
On Jan 4, 2009, at 6:48 AM, Alex Jurgensen wrote:
Hi,
How do you map Applescripts to Keyboard Shortcuts exactly?
Thanks for lisetning,
Alex,