Need Some Help? Have a Tip to Share?

Email me at MacTipper@gmail.com, or, leave a comment!

Subscribe To Our FREE RSS Feed!

Don't miss out on any posts from the Concise MacTipper Blog.

Tuesday, April 28, 2009

Use a Keyboard Shortcut to Open Files in Non-Default Apps

It is possible to open a file in its default application using Cmd-O. Using System Preferences or an AppleScript it is possible to make a keyboard shortcut to open a selected file in the file's non-default application.

Method 1: Make a Keyboard Shortcut in System Preferences

Step 1: Open System Preferences and go to the Keyboard & Mouse settings.

Step 2: Click on the "Keyboard Shortcuts" section.

Step 3: Click on the + symbol in the lower-left corner.



Step 4: Make the keyboard shortcut for "Finder" with the menu title of the app you want to open it with "QuickTime Player.app" for example) and hit a keyboard shortcut.





Method 2: Use an AppleScript in Conjunction with a Keyboard Macro Program

This method is much more stable and is easily adaptable. Use the following AppleScript to open the selected Finder items in the application named in the first property:

(Click here to open the script in Script Editor)

property the_app : "QuickTime Player"

tell application "Finder"
set the_selection to the selection
end tell

repeat with each_item in the_selection
do shell script ("open -a " & (quoted form of the_app) & space & (quoted form of (POSIX path of (each_item as alias))))
end repeat

0 comments:

Post a Comment