I am running Mac OS X Lion. What I want is a way to open an HTML
file with a particular application based on my action.
For example, the default application is Safari, so it will always open in Safari if double clicked. However, I want to add another gesture, (such as tapping on middle top of the trackpad) while the file has been selected (highlighted), such that it will open in TextWrangler.
Is it possible? I am also using BetterTouchTool.
Best Answer
Use this AppleScript to open a file with a particular application:
I've never used BetterTouchTool but according to the documentation, you can set up any input (such as a three-finger tap) to run an arbitrary AppleScript if it's saved as a
scpt
file.Open the AppleScript Editor, copy and paste the code above, and save it as
opentw.scpt
or something similar. Then in BetterTouchTool, add a new gesture. Choose three-finger tap as the gesture, and choose the Predefined Action ofOpen Application/File/Script
. Locate the AppleScript file you saved above as the script to open.