By the way, as I could not find a single example of an Apple Script for tagging selected items in the archive on a quick & dirty search, so here is my variant for the records:

<pre>
-- tag all selected items in Yojimbo
-- Presents the user with the list of current tags in
-- Yojimbo; if none is chosen, the user can create a
-- new tag by pressing cancel. If this is canceled as
-- well, nothing happens.

tell application "Yojimbo"
        set all_tags to (name of every tag)
set tag_name to choose from list all_tags with prompt "Tag selected items with (or Cancel to create new tag):"
        if tag_name is false then
                display dialog "Tag name to add:" default answer "new"
                set tag_name to text returned of result
        end if
        set the_selection to the selection
        repeat with an_item in the_selection
                add tags {tag_name} to an_item
        end repeat
end tell
</pre>

Reply via email to