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

Add keyboard shortcuts to AppleScripts in Mail.app Apps
I have a spam-reporting AppleScript for Mail.app that I wrote and process manually, and I wanted to assign a keyboard shortcut to it like some of the scripts Apple provides in the script menu.

I looked at the scripts in the Mail.app package and saw that some had something like ___ctl-r at the end of their names. So I added ___ctl-s (that's three underscores) to the end of the Script name in my ~Library -> Scripts folder, and updated the script menu. Voila! It added a Control-S marking next to the Script in the menu. cmd and opt also work for command and option respectively.

I tried to get multiple modifier keys to work, but couldn't figure out how to do it, or if it's even possible. Using a key combination that's already used by Mail removes any key combination from that script.

[robg adds: This was mentioned in passing before, as I noted here. However, I figure this is worth documenting in its own hint. I've been able to use multiple modifiers just by combining them: script-name___ctl-cmd-p.scpt assigns Control-Command-P, for instance. As far as I know, this only works for Mail scripts, not Finder scripts nor any others that I've heard of.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[10,652 views]  

Add keyboard shortcuts to AppleScripts in Mail.app | 2 comments | Create New Account
Click here to return to the 'Add keyboard shortcuts to AppleScripts in Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add keyboard shortcuts to AppleScripts in Mail.app
Authored by: DougAdams on Jun 21, '04 01:11:08PM
You can add keyboard shortcuts to any app with a scripts menu. Here's how to do likewise with iTunes, but you can use the same technique in Mail.

[ Reply to This | # ]
Add keyboard shortcuts to AppleScripts in Mail.app
Authored by: Tom Robinson on Jun 21, '04 03:46:39PM

This is documented in Mail's help under Customizing Mail > Using the Scripts menu.



[ Reply to This | # ]