Follow these instructions to create an AppleScript App that can be used to open URLs, e.g. from Choosy.
- Open Script Editor (in
- Write a script with an
on open locationhandler (see
- Save the script as an application (select "Application" from the file format dropdown in the save dialog in Script Editor).
- Edit the application's
Info.plistfile to add a
CFBundleURLTypessection, indicating it can handle HTTP URLs (see
Info.plist). If the app is at
Info.plistwill be at
- Test your application from the command line using
open -a ~/Applications/MyApp.app http://www.example.com
- Update the AppleScript to do something useful with the URL (the
do shell scriptcommand might be useful if you want to avoid writing more AppleScript).