3

I'd like to be able to open a file with a simple keyboard shortcut. It's always going to be the same file. I want to do this because I have an encrypted disk image that I'd like to mount quickly and easily. So if I'm in Chrome and I want to download a file to the disk image, I could click "ctrl + 1 + 2 + whatever", the drive would be mounted, and then I could save the file to the mounted drive.

I'm running Mac OS X 10.6.4.

Brian
  • 187

2 Answers2

7

Wow, my first answer was actually completely wrong about OS X—I actually discovered this today, but a large part of the improvements to automation that Apple made for 10.6 make it possible to accomplish this through the use of services.

Open Automator from the Applications folder and choose the Service template. Specify Service receives no input in any application at the top. Then define your workflow however you want, either by using the Get Specified Finder Items and Open Finder Items actions, the Run AppleScript action, or the Run Shell Script action, and save the workflow as "Mount My Encrypted Disk Image" or whatever. It'll be automatically added to the services menu.

To assign a keystroke to this service, go to System Preferences -> Keyboard -> Keyboard Shortcuts -> Services, and assign a keyboard shortcut to "Mount My Encrypted Disk Image," which should appear under General.

NReilingh
  • 5,777
  • I used the Get Specified Finder Items and Open Finder Items action in that order in my automater workflow. When I assigned the keyboard shortcut it was not immediately obvious to click in the empty space to the right of the service name.

    Your directions were dead on. I am really impressed. I honestly wasn't expecting an answer for this question. Thank you so much!

    – Brian Aug 12 '10 at 04:12
2

OS X cannot do this on its own. You can define custom keyboard shortcuts, but only for existing menu items in any application.

There is 3rd party software that can accomplish this. I personally use Keyboard Maestro (the last version they released that was free—still works in 10.6!) but that is now shareware. QuickSilver seems to be another alternative; that's free but has some significant extra functionality—not sure how much of that you could turn off. Butler is a cheaper alternative to Keyboard Maestro.

If you do further research on this, what you're really looking for is "Keyboard Macros."

NReilingh
  • 5,777