ListManagementHouseCleaning

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

Re: ListManagementHouseCleaning

Post by klownboy »

Posted version 2.41 of ListManagementHouseCleaning- see first post. Hopefully it's getting a bit closer to a final product until List Management items are changed or new ones added.

Thanks Stef123 and hermhart for the comments and suggestions.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

elqasar
Posts: 96
Joined: 01 Jun 2016 15:13

Re: ListManagementHouseCleaning

Post by elqasar »

Is this script expected to work on both panes? I tried running the script to clear History and Recent Locations but afterwards I still had lots of history and/or recent locations for the tabs in the other pane.

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

Re: ListManagementHouseCleaning

Post by klownboy »

Hi elqasar,
History and Recent Files are based on the what pane you are currently in at the time it's run. So it looks like if you run it again while in pane 2 it will clear the History and Recent Files for pane 2. I just checked that since it has been quite awhile since I wrote this. You can check History by running ::#618; in the Address bar once in pane 1 and then switch to pane 2 and run it again. Remember though, even when it's wiped clean it will always have an entry for the current location. So in other words it's never going to be completely. That's by design.
I'll see if there may be an easy way to clear both panes out but it would probably mean changing panes in the script to do so...not sure if it's worth it (i.e., versus running it again in pane 2).
Thanks,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

elqasar
Posts: 96
Joined: 01 Jun 2016 15:13

Re: ListManagementHouseCleaning

Post by elqasar »

Thanks Ken, I will run it again in pane 2. Your script saves a lot of time for cleaning all these things.

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

Re: ListManagementHouseCleaning

Post by klownboy »

Thanks elqasar. When I get a chance I'll look at the script and modify it such that if Recent Files and History or any other pane dependent List Management item are selected to clean, after doing the normal pane 1 cleaning, switch to pane 2 and clean those items which are pane dependent and then switch back again.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Zardoz2293
Posts: 577
Joined: 09 Nov 2011 20:20
Location: USA

Re: ListManagementHouseCleaning

Post by Zardoz2293 »

Bravo! Well Done! Excellent!
Computer/Systems Background = Expert | Windows 10 Pro (64-Bit) | Dell Precision 7720

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

Re: ListManagementHouseCleaning

Post by Member »

Getting an error "Dubious syntax: $sel_name*"

Does anyone know how to fix that? Thanks.

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

Re: ListManagementHouseCleaning

Post by klownboy »

Try un-checking "Syntax Checking" under the Scripting menu to see if you still get the error.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

admin
Site Admin
Posts: 60289
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: ListManagementHouseCleaning

Post by admin »

klownboy wrote: 02 Mar 2020 14:14 Try un-checking "Syntax Checking" under the Scripting menu to see if you still get the error.
The error won't come anymore then. But the cooler response would have been to correct the syntax. ;) :mrgreen:

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

Re: ListManagementHouseCleaning

Post by klownboy »

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. 
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: 02 Mar 2020 15:38
klownboy wrote: 02 Mar 2020 14:14 Try un-checking "Syntax Checking" under the Scripting menu to see if you still get the error.
The error won't come anymore then. But the cooler response would have been to correct the syntax. ;) :mrgreen:
Thanks for this as a general statement. I was about to say the same.

Though, of course, it would be no problem to suppress syntax checking until there's time to repair the script.

But, in general again, it would help to create scripts, especially for the public, with syntax checking ON.
Always.

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

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

Re: ListManagementHouseCleaning

Post by Member »

Updating line 110 and 153 did remove the syntax error. However, running the script after the update does not clear the history.

Turning off syntax checking before updating line 110 and 153 did remove the error, and also cleared the history.

Any thought on what else needs to be updated?

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

Re: ListManagementHouseCleaning

Post by PeterH »

I think there's an error in the change...

If I'm right the '|*' near the end of both statements should just be '*'

You could just try to change and test that.

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

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

Re: ListManagementHouseCleaning

Post by klownboy »

Yes PeterH is correct. I tried it both ways before I posted that the other day and they both ran without the syntax error but I hadn't checked thoroughly that the list(s) were properly cleared in both cases. Remember though it will not clear the current folder from history whatever it is.

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 . '*');
Last edited by klownboy on 03 Mar 2020 17:25, edited 1 time in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

admin
Site Admin
Posts: 60289
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: ListManagementHouseCleaning

Post by admin »

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*");

Post Reply