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).
Thanks again! This was really helpful.
I now have an app with this:
And this in Choosy:
So I can now open Dropbox screenshots without waiting for their super-inefficient web page to load when all I want is the image.
(Yes, there's a potential expoit waiting in the
open+ concat, so I'll be careful. (-: )