Skip to main content

AppleScript action!

Posted in

I thought I'd point out some of the usefulness of the new AppleScript features in Pukka in a little more detail. With an application launcher like LaunchBar or Quicksilver that can launch AppleScripts, you can bookmark things to del.icio.us in only a few keystrokes.

Case in point: I find myself frequently needing to bookmark things to read later. So my workflow is this: I browse them in Safari, hit Command-Space to bring up LaunchBar, and type B to bring up my entry for the Bookmark current Safari page to read later script.

screenshot of LaunchBar calling AppleScript

I hit enter and a few seconds later see a Growl notification that the page has been bookmarked. Pukka doesn't even come to the foreground and I have posted a link complete with URL, title, referrer (if any), and any selected text in the description. The link is also tagged @toread and is marked as private. I didn't have to even see Pukka nor wait for any delays with del.icio.us for all of this to happen.

Thanks, AppleScript!

If you use the above script, be sure to edit it in Script Editor first to change it to your desired username, tag(s), and privacy settings.

I'd love to see what scripts you can come up with, so feel free to post in the comments if you have any scripts or any ideas for scripts. Also check out this TUAW post on enabling the AppleScript menu if you don't normally use a launcher.

Trackback URL for this post:

http://codesorcery.net/trackback/36

I don't know anything about scripts, I'm trying to modify this for Camino, I changed the customized settings, and the app to "Camino." When I tried to save it, it gives me: Can't get "document.title" in document 1. Access not allowed.

Hi Andy. I don't think Camino allows the "do JavaScript" action like Safari does, but I could be mistaken. I will look into it a bit and see what I can find, though.

I looked into it a bit, and it looks like Camino does not in fact do the JavaScript thing yet, so it makes it impossible as far as I can see to get the title, referrer, and highlighted text. I tried changing it to work, but then you end up with no title, which del.icio.us won't take. If you don't mind having the same title for every post done in this way, I can send you the script, but that doesn't seem very useful to me.

In short, until Camino beefs up the AppleScript support, this doesn't work so well :-/

Oh well, thanks for checking it out.

I recently modified this script to use Safari's 'do javascript' to grab a list of tags from a text prompt before creating and adding the link.

http://www.splee.co.uk/2006/08/19/delicious-pukka-and-more-applescript/

Using a Quicksilver trigger you can override Safari's cmd-d "Add Bookmark..." shortcut and create your del.icio.us links with a single keystroke (plus the typing of the tags of course).