ListManagementHouseCleaning

Discuss and share scripts and script files...
klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Thanks Don. I stepped through the script for a few runs and yes, your short and sweet version works fine. :tup:
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: ListManagementHouseCleaning

Post by PeterH »

admin wrote: 03 Mar 2020 17:09 I'm not an expert in scripting, and this is air code, but I think it should work like this as well:

Code: Select all

        Line 110   $LM_data = FormatList($LM_list_1, 'f', "<crlf>", "*|$sel_name*");
	Line 153   $LM_data = FormatList($LM_list_2, 'f', "<crlf>", "*|$sel_name*");
Hey, optimizations? One more: <crlf> is a variable, (OK: with a constant value,) and as such it may be inside double quotes, but it doesn't need them. So:

Code: Select all

        Line 110   $LM_data = FormatList($LM_list_1, 'f', <crlf>, "*|$sel_name*");
	Line 153   $LM_data = FormatList($LM_list_2, 'f', <crlf>, "*|$sel_name*");
It's the same as for $LM_list_1 :tup:

Peter
W7(x64) SP1 German
( +WXP SP3 )

Member
Posts: 15
Joined: 13 Oct 2009 03:09

Re: ListManagementHouseCleaning

Post by Member »

Confirmed working now. Thanks gentlemen.

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

@ PeterH thanks, that script was littered with quoted <crlf>'s. I replaced them all with unquoted versions.

With that script being nearly 5 years old, I was thinking awhile back that there may be some new or changed List Management items that should be reviewed. I'll take a look when I get a chance.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Kryzalin
Posts: 8
Joined: 24 Oct 2016 11:28

Re: ListManagementHouseCleaning

Post by Kryzalin »

Thank you for the script and this syntax fix.
klownboy wrote: 02 Mar 2020 15:45 Yes, I agree Don but I was running late for something. The two lines in question can be fixed without turning off syntax checking by changing line 110 (the old line is commented out):

Code: Select all

//		 $LM_data = FormatList($LM_list_1, 'f', "<crlf>", '*|' . $sel_name*);          // Get LM line.
		 $LM_data = FormatList($LM_list_1, 'f', "<crlf>", '*|' . $sel_name . '|*');          // Get LM line.
and line 153 as follows:

Code: Select all

//		  $LM_data = FormatList($LM_list_2, 'f', "<crlf>", '*|' . $sel_name*);          // Get LM line. 
		  $LM_data = FormatList($LM_list_2, 'f', "<crlf>", '*|' . $sel_name . '|*');          // Get LM line. 

GreetingsFromPoland
Posts: 213
Joined: 29 Sep 2022 14:20

Re: ListManagementHouseCleaning

Post by GreetingsFromPoland »

hi! using 23.90.0400 and higher and 2.41, i noticed it no longer saves the modifications made in the tag list.

during the script run, the tag list is presented, i remove an entry, click ok to continue, save changes at the end but the tags save message is not listed in the status bar any longer (and changes are not saved).

i'm guessing with all the recent changes to how tags work that the script may need an update. if so, can i also make a suggestion ? on the second phase of the script, when data is detected, a symbol is appended to the display text (this is great). is it possible to have those item(s) automatically pre-selected ? i can make the changes to the script manually and they work; however, maybe it can be officially added to your copy ?

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Hi GreetingsFromPoland. I really haven't looked at this for a while and I haven't had as much time as I'd like since I'm working on other scripts. I do still use it though. If you have some working fixes or updates, feel free to let me know either here or PM me and I'll gladly incorporate them. I don't have any tags so any possible help there would be appreciated as well. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Hey again GreetingsFromPoland, concerning your request to have the items with content in the second List Management 2nd dialog box pre-checked. That question or idea was raised years ago (see the release notes for version 2.1 para 2). As you can see, I wasn't crazy about the idea since it would mean automatically opening all items with content. Some users may not care to do that, at least not automatically. I'll incorporate an internal option in the script, which would have the check in addition to the dot or possibly check vs dot. Yes, there have been numerous changes to tag data that I'll have to look at as well.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

GreetingsFromPoland
Posts: 213
Joined: 29 Sep 2022 14:20

Re: ListManagementHouseCleaning

Post by GreetingsFromPoland »

i apologize for my delayed response. thank you for looking at the script again. it is super handy to use.

i agree that some (if not most) users would not items pre-selected in section 2. i like it (the modification i made to have it do that) and have gotten used to clicking through some of the ones where there is data but hasn't necessarily changed. even though i use the mini-tree, it gets unruly looking after some time and i prefer it "cleaned". sometimes i click the button for your script, it runs section 1, then i cancel (to just get the effect of cleaning the histories).

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Hi GreetingsfromPoland, could you clarify what you mean when you said, "the tag list is presented, i remove an entry"? I want to make sure we are talking the same thing. Are you actually referring to the "Tag List" (CID #635) or actual "Tagged items..." (CID #637). You go on to say, "and changes are not saved". Are you referring to the tag list item that you deleted is not saved or are you saying the tag item that you deleted is not removed from the actual tagged file or folder? The Help file states, "Note that editing the Tag List does not change or remove any tags from your files or folders! The Tag List is only your interface to selecting/attaching tags."

That second dialog in the script simply calls out the appropriate CIDs (based on the items selected) from List Management. If you select "Command IDs on menu" from Help on the Main menu, you'll see all the CIDs listed for each List Management item when List Management is selected from the Tools menu. The script isn't doing anything with the status bar or XY's messages.

After removing an item from the "Tag List", it no longer shows up in the Tags menu of "Add tags by list" It does show up in the Edit tags by list because that particular file or folder still has that tag even though it's been removed from the "Tag List".

I ran a number of tests myself deleting items on the "Tag List" and tests deleting Tagged items using the script. I also ran test by simply invoking the CID #635 (Tag List) and #637 (Tagged items) from the Address bar and the result was the same. It should be, since that's all the script does in that dialog section (i.e., invoke the CID).

I've made the pre-check changes we discussed earlier and added new List Management item "Live Favorite Filters". I didn't notice any other new ones.

Thanks
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

GreetingsFromPoland
Posts: 213
Joined: 29 Sep 2022 14:20

Re: ListManagementHouseCleaning

Post by GreetingsFromPoland »

hi! thank you so much for working and looking into this. the issue that i have is with the Tagged Items (CID #637). when i run the script and the dialog that is connected to CID #637 is displayed, i remove entries using the Delete button and the script continues, but those entries still remain both on the tagged items and in the dialog box (when the script is re-run).

i don't recall this happening prior to XY's more recent overhaul of Tags.

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

That's strange, the tags are deleted fine on all my runs. So, when the script opens CID#637 dialog, you delete tags you've highlighted, then hit OK, and you are also saving when the script asks at the end? It almost sounds like you are in some read only mode or something similar. I'm not familiar enough with XYplorer tagging to know if that's possible via some setting or tweak. Though XYplorer can be run in readonly mode. Have you tried to run #637; directly from the address bar to see if there's a difference in behavior? It should be the same since that's all the script is doing here.

An unrelated question to anyone out there: Have you experienced any problems with the first section/dialog where the script is not deleting the entries after the mru line -----> mru or is deleting all entries instead of only those entries below the mru line or is not deleting anything? Of course, this would only apply to those entries where you have saved entries above an mru line and you may not be using an mru line. The script is setup to delete the entries below the mru line. The SC sendkeys involves sending keys for cut and paste. The steps are correct, but in some cases, they may be affected by clipboard programs like the one I use is Clipjump written in AHK. It works fine with Clipjump disabled. So, I'm wrestling with that now.

I also made changes such that if "History" is selected, it will change panes and delete History from the other pane as well.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

GreetingsFromPoland
Posts: 213
Joined: 29 Sep 2022 14:20

Re: ListManagementHouseCleaning

Post by GreetingsFromPoland »

klownboy wrote: 19 Feb 2023 18:06 So, when the script opens CID#637 dialog, you delete tags you've highlighted, then hit OK, and you are also saving when the script asks at the end?
hi! yes, that is how i was removing them. now, it has been several beta releases since i have tried doing this again. i ran the script yesterday, deleted a tag, clicked OK, continued and saved at the end (as i normally would do) and this time the tag was removed. the only thing that was different, but probably wouldn't make a difference, is this tag was on a local drive and previously the ones i was deleting were from non-connected removables (tag had the question mark icon on the left).

i don't have any other tags referring to removables at the moment, but it would appear everything else is working.

thank you for your work on this script, it really does keep XY clean. looking forward to a new release !

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

GreetingsFromPoland wrote: 21 Feb 2023 13:39 looking forward to a new release
Hopefully not too much longer. I need to do some more testing. Thanks for the additional feedback.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: ListManagementHouseCleaning

Post by klownboy »

Updated the ListManagementHouseCleaning script to version 2.5. See the first post for a description of changes to download.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply