Tag Control

Discuss and share scripts and script files...
Post Reply
binocular222
Posts: 1416
Joined: 04 Nov 2008 05:35
Location: Hanoi, Vietnam

Tag Control

Post by binocular222 »

A request from stanmarsh, maybe useful to others.
Similar to Flat File management attempt#1 http://www.xyplorer.com/xyfc/viewtopic. ... ent#p94487, this script add/remove tags, which are stored in filename in such format: "Base ~ Tag1, Tag2,"
If you don't want the popup menu, just call the script's label such as:

Code: Select all

load "TagControl.xys", "add"
Attachments
TagControl.xys
v2: add ability to cache incase too many, thus slow to retrieve $TaginList
(5.71 KiB) Downloaded 170 times
TagControl.xys
v1
(4.21 KiB) Downloaded 128 times
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

pleiades
Posts: 52
Joined: 13 Aug 2016 10:36

Re: Tag Control

Post by pleiades »

ola binocular!

i found this filename tag system and like to use it instead of the built-in tag system, after thinking about it, the filename tag system is better suited to my needs because i can see the tags quickly and i can use another program to search for the tags.

i would like to request a feature for tagcontrol, i like to have a one click add tag / remove tag similar to the built-in tags, instead of showing a popup it will add the tag quickly in the filename.

how to do this?

TIA!

highend
Posts: 13308
Joined: 06 Feb 2011 00:33

Re: Tag Control

Post by highend »

But he has already written how to do that in the first post?
If you don't want the popup menu, just call the script's label such as:

load "TagControl.xys", "add";
One of my scripts helped you out? Please donate via Paypal

pleiades
Posts: 52
Joined: 13 Aug 2016 10:36

Re: Tag Control

Post by pleiades »

Using the "load "TagControl.xys", "add";" opens up a pop-up to select tags to add, what i'm looking for is the same function of the native tag system Click and Tag, you just choose files/folder then click the "Click and Tag" and it will add the Tag quickly without any pop-ups.

highend
Posts: 13308
Joined: 06 Feb 2011 00:33

Re: Tag Control

Post by highend »

Ok, I see

This little script would do this. No fancy features, it just tags items with whatever they have behind the "~" delimiter...
It saves the tag database right after the tagging process itself.

Code: Select all

    foreach($item, <get SelectedItemsPathNames <crlf>>, <crlf>) {
        $tags = trim(gettoken(gpc($item, "base"), 2, "~"));
        if !($tags) { continue; }
        tagitems("tags", $tags, $item);
    }
    if ($tags) { status "Tags added!"; savesettings 64; }
    else { status "Items didn't contain tags, nothing done!", "8B4513", "stop"; }
One of my scripts helped you out? Please donate via Paypal

pleiades
Posts: 52
Joined: 13 Aug 2016 10:36

Re: Tag Control

Post by pleiades »

thank you again highend! :tup: :tup:

Post Reply