Page 7 of 8

Re: ListManagementHouseCleaning

Posted: 29 Sep 2015 13:38
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.

Re: ListManagementHouseCleaning

Posted: 03 Oct 2016 19:24
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.

Re: ListManagementHouseCleaning

Posted: 03 Oct 2016 20:10
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

Re: ListManagementHouseCleaning

Posted: 03 Oct 2016 20:16
by elqasar
Thanks Ken, I will run it again in pane 2. Your script saves a lot of time for cleaning all these things.

Re: ListManagementHouseCleaning

Posted: 04 Oct 2016 15:52
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.

Re: ListManagementHouseCleaning

Posted: 12 Jul 2018 04:53
by Zardoz2293
Bravo! Well Done! Excellent!

Re: ListManagementHouseCleaning

Posted: 02 Mar 2020 06:33
by Member
Getting an error "Dubious syntax: $sel_name*"

Does anyone know how to fix that? Thanks.

Re: ListManagementHouseCleaning

Posted: 02 Mar 2020 14:14
by klownboy
Try un-checking "Syntax Checking" under the Scripting menu to see if you still get the error.

Re: ListManagementHouseCleaning

Posted: 02 Mar 2020 15:38
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:

Re: ListManagementHouseCleaning

Posted: 02 Mar 2020 15:45
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. 

Re: ListManagementHouseCleaning

Posted: 02 Mar 2020 17:11
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

Re: ListManagementHouseCleaning

Posted: 03 Mar 2020 04:58
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?

Re: ListManagementHouseCleaning

Posted: 03 Mar 2020 11:05
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

Re: ListManagementHouseCleaning

Posted: 03 Mar 2020 16:11
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 . '*');

Re: ListManagementHouseCleaning

Posted: 03 Mar 2020 17:09
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*");