Page 1 of 1
Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 00:59
by kiwichick
Hi there, I'm been creating custom buttons for my own tagging needs and you guys have been amazing helping me out with code. And although I have my own custom tags, I would still like to open the 'Tag List......' as it appears when opened from the default 'Add Tags' and 'Remove Tags' buttons (ie: it's not just the list but has checkboxes and will add or remove tags accordingly). Can someone please help me with the code for that? Cheers.
Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 04:44
by highend
#882
#888
?
Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 06:22
by kiwichick
Oh geez, I don't know how the heck I managed to miss those

Thanks yet again, highend. But the actual code would be great too

Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 08:39
by highend
What code?

Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 08:53
by kiwichick
Sorry, the script commands that are the equivalent to the Function ID. Aren't Function IDs shortcuts to actual script commands?
Like the function ID:
#234 = Edit | New | New Text File "New Textfile.txt" (Ctrl+Shift+N)
But the same is achieved by:
new("New TextFile.txt", , , r);
Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 09:48
by highend
Aren't Function IDs shortcuts to actual script commands?
Only some of them.
#882
#888
are the actual commands that can be used in scripts. If you want something that extends / modifies these commands, you have to build up your own via "normal" scripting commands (inputselect, foreach loops to build up tag lists, etc.).
Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 10:33
by kiwichick
highend wrote:you have to build up your own via "normal" scripting commands (inputselect, foreach loops to build up tag lists, etc.).
Yeah highend, I realise that and that was what I meant. I sort of understand about getting tags from items but I have no idea how to get the tags that are on the Tag List.
But, along a similar line of thought, can you tell me, can I assign a Function ID to a variable? So, for example, I could use #882 and #888 as the 'inputselect'?
Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 11:06
by highend
how to get the tags that are on the Tag List
They are stored in the XYplorer.ini file. Section "Settings", label "TagsList".
Store the line in a variable (via getkey()) and use a foreach or while loop to build your own custom list (if you want that).
can I assign a Function ID to a variable?
No. They are commands and afaik they don't return any value.
Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 11:59
by kiwichick
Thank you very much for being so patient and helpful.
Re: Code to open Add or Remove 'Tag List...'
Posted: 27 Sep 2012 12:34
by kiwichick
Thanks heaps, highend, The getkey() and Section "Settings", label "TagsList" were everything I needed. I've used them with inputselect and it works perfectly

YAY!!!!!
Re: Code to open Add or Remove 'Tag List...'
Posted: 05 Jan 2013 15:44
by Kees54
Hi Kiwichick,
I'm new here and I'm looking for a way to search by tags:
I'd like to make a hotkey so that I get the window `Find by tags´ where I can tick the tags. It´s the same window that comes down when the blue label button is clicked. In fact, it´s the TAGlist where you can choose the tags to find.
I got an answer that the only option is to do it with a script
You can see the discussion in 'Tips & Tricks, Questions & Answers' called "Missing shortcut keys?!!"
I read your question and was wondering whether you had the same thing.
Maybe you have made a script like that, I'm not a programmer, so...
Re: Code to open Add or Remove 'Tag List...'
Posted: 06 Jan 2013 10:17
by kiwichick
Hi Kees54, I also want to be able to use a 'hotkey' via a Function ID or ScriptCommand to invoke the "Find by Tags" window and I started a thread about it here:
http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=8670. Unfortunately Don says it's unnecessary so the script that serendipity has posted there is about the closest we'll get at the moment. But it isn't really invoking the "Find by Tags" window, it's just doing a search. Hope it helps a little bit. Maybe if you add a request to that thread Don might reconsider it in the future

Re: Code to open Add or Remove 'Tag List...'
Posted: 06 Jan 2013 12:37
by admin
Here's another small tag finder script that you can put into a button or bind to a key via UDC:
http://www.xyplorer.com/xyfc/viewtopic. ... 597#p80597