Yojimbo “Launch Items” Applescript

Kudos to BareBones for the 1.4 version of Yojimbo. I’ve wanted to be able to launch the location associated with a password via a single keystroke for some time, and now I have it, yay!

Actually, this will work for not just passwords, but bookmarks and web items as well, check it out.

on run
        tell applicationYojimbo
                
set tSel to the selection
                if tSel is {} or class of tSel is not list then
                        display dialogThis script only works on selected items.buttons {“OK“} default button 1
                else
                        set foundSomething to false
                        repeat with tItem in tSel
                                set tLoc to “”
                                if class of tItem is password item or class of tItem is bookmark item then
                                        set tLoc to location of tItem
                                else if class of tItem is web archive item then
                                        set tLoc to source URL of tItem
                                end if
                                if tLoc is not “” then
                                        tell applicationFinder
                                                
open location tLoc
                                        end tell
                                        set foundSomething to true
                                end if
                        end repeat
                        if not foundSomething then
                                display dialogCould not find any locations to launch.buttons {“OK“} default button 1
                        end if
                end if
        end tell
end run