[Software] Applescript to use my ShortURL service.

It’s trivial, and lacking as compared to my JavaScript native bookmarklet, but here’s how you might accomplish the same thing in AppleScript, er, which uses JavaScript. Note that the slashes are merely to break the lines, you should remove them. ;) Note that it requires the GUI Scripting software, but will most likely run native under the up-and-coming Panther.

tell application “Safari” activate if not (exists document 1) then display dialog “No browser windows are open.” buttons {“Cancel”} default button 1 end if do JavaScript “x=(escape(window.location));window.location \\ =’http://www.holwegner.com/toys/redir.php?doop=addurl&password=foo&urlpath=’+x;” \\ in document 1 end tell

[Edit: Modded to escape location href to make sub-post vars not get stripped. Oops.]