Tagging Toolbar

I'm creating a toolbar specifically for tagging files.
As my proof of concept kind of test bar I created several tags;
Frog, Monkey, Snake
So far I've gotten it so any file I select if I L-click any of the tag buttons, it adds the tag next in line under tags,
If I R-click any of the tag buttons it removes the corresponding tag.
So if my file is [quote]Archive.7z[/quote] and I add Frog then Snake I end up with

If I add Monkey then I get

my question is, Is there a way to get dopus to arrange the tags preferably alphabetical order?
So when I add monkey i get [quote]Archive.7z Frog; Monkey; Snake[/quote]
Also is there a way to prevent deselecting the file after I click the button to add each tag?

Right now each tag button is set up as a three button with [ul]SetAttr META tags:+Frog as my LMB
SetAttr META tags:-Frog as my RMB[/ul]
I'm originally tried to set each button as a toggle so if the file didn't have the tag it would add it and if it had the tag it would remove it but after reading through the manual and looking on the forms the three button was all I could come up with.

Thank you much.

1 Like

You'll probably need to use scripting to make toggle buttons and/or to sort the tags alphabetically (which would require looking up the current tags, removing them, then adding them back to the file plus the new tag in sorted order). Enumerating files and metadata tags is a good starting point.

Thanks Leo,
The better I get and figuring things out the more complex the questions get.

Locki, This is a perl addin script that will change a folder's tags based on what is below it by one level. I use it with tiles set up to show rating and tags, see below.

You can use it as a starting point for your tag toolbar. You'll need activeperl installed or convert it, hopeful the comments help in that. Myamour and MrC have threads on setting up perl for dopus. They also supplied snippets for this with kundal - Thanks guys.

The script scans a folder's sub directories and files for their rating and tags (with audio I grab the genre). It then puts this in the selected folders. It limits the tags to the top ten (most common to least) plus secondary to alphabetically where the same rank. The rating is the max found.

It adds a little extra to the folder's tile info so I know where the good stuff is, but probably has the bits you're looking for.

I set my tile mode to:

Sub Dirs/Files: {dircount}/ {filecount} {rating} {keywords}

Also, I did a similar exercise to you with setting up buttons for common tags and found it easier to set the tag in a variable and use the @keydown:none and shift to add and subtract it.

@set tag = Beagles @nodeselect @keydown:none SetAttr META "tags:+{$tag}" {allfileshort} @keydown:shift SetAttr META "tags:-{$tag}" {allfileshort}
TagFolderfromContents.zip (1.9 KB)