ListManagementHouseCleaning
Posted: 06 May 2015 15:05
ListManagementHouseCleaning.xys Version 1 ListManagement is extremely useful, but I wanted to be able to quickly access numerous List Management items without going back and forth to open them. After a period of time, I like to clean house completely on some list items or on others simply weed out entries or edit them like, Address Bar Recent Locations, Recently Opened Files, etc. Whatever you want to do in List Management, this script is intended to make access easier when you want to clean/clear or edit multiple List Management items. It will provide you with a list of them and you can quickly check off the ones you'd like to clear or edit and it will then open each one in succession. After editing all of them it will provide you the opportunity to save everything. You don't have to at that point, but if you exit XY without saving the changes will be lost.
Application | Use: Make a customized toolbar button (CTB) to replace both the built-in Configuration and List Management buttons with one CTB - left click for Tools Configuration and right click to use this script for List Management House Cleaning. Obviously this is not a big deal, I only wanted to make access quicker for clearing or editing multiple List Management items. I initially wasn't going to bother uploading, but then I figured maybe someone else can get some use out of it.
Version 2 of ListManagementHouseCleaning.xys will now:
1) First the script will display List Management items to select for complete clearing (see screen capture - picture on left) and will then automatically clear all you've selected. This dialog list contains the typical MRU type lists that if you delete all is hell is not going to break out.
2) Next it will provide you with another dialog of List Management items (see screen capture - picture on right) from which you can select the items you which to edit one by one in succession (though you can also clear them). This dialog contains the more important List Management items like Favorite Folders or Portable File Associations.
3) Lastly, the script will ask you if you'd like to save the changes. If you elect not to, that's alright, but the changes you've made will not be saved if you exit later without saving.
Notes:
1) If you'd rather not automatically clear any List Management items in the first dialog simply click on "OK" or press "Enter" to proceed on to the next dialog to edit List Management items.
2) You see the screen flicker for a a second or two after the first dialog while the script clears the List Management items you've selected. How long it flickers depends on how many you've selected.
3) I could have done this in a 2nd instance of XY, but there are too many complications and annoyances doing that such as loosing focus of the first XY instance.
4) If you'd rather have one particular List Management item in the "Clear" list instead of the "Edit" list or visa versa, you can easily swap them in the script. The items in the two lists were my own quick personal preference. You could place all the List Management items in the second "Edit" dialog if you'd like. Version 2.1:
1) In the Clear List Management items dialog, the script will pre-check any items which have content (i.e., those that aren't void of entries).
2) In the Edit List Management items dialog, the script flag all items which have content. The flag is a big fat dot. I purposely did not pre-check the items having content as I did in the clear dialog. I didn't want to open all of these List Management item dialogs automatically unless the user checks them off simply to minimize time opening unnecessary dialogs coupled with the fact that this "Edit" dialog contains much more critical lists that the user would not want to accidentally delete or clear.
3) I also rearranged some of the List Management items between the Clear and Edit dialogs to be more in-line with whether the user would want to edit or clear the list.
Thanks highend for the pre-check suggestion.I hope you can get some use out of it. Please let me know if you have any suggestions or problems.
Version 2.2:
1) It will now recognize the Sticky Section - mru items above the mru line "-----> mru" will be preserved. As it states in the help file, "Items in the Sticky Section are permanent members of this list and will never be pushed out when new items are added." The script will only delete the mru's below the mru line.
2) Took care of a couple of local references to my personal XY folder instead of using <xydata>.
As I mentioned in a previous post, I kept the 3 MRU lists, RenameSpecial, mruBatchRename, mruRegExpRename in the edit list dialog not in the auto clear list dialog. Those seem too important to wipe out (clear) if someone does not have sticky sections established.
Sorry for being ignorant on the Sticky Section of mru list when I initially wrote this (thanks hermhart). I obviously hadn't been taking advantage of the feature.
Version 2.3:
1) Added the "e" flag to formatlist to prevent any blank items in a List Management.
2) Took advantage of the new "e" flag in the foreach loops which skips or disregards any empty or blank items in the foreach list. You will need version v15.70.0118 or later.
3) Added an initial save dialog in the beginning to ensure the users settings are saved prior to continuing in List Management House Cleaning. If you don't want to see it or you save frequently anyway, you can comment it out if you'd like.
4) Recognized if the user does not have a tag.dat file in <xydata>.
5) Modified the script to recognize if the user did not make any selections in either dialog box or cancelled out of both dialogs. The script will not prompt the user to save settings at the end of the script.
6) Added the new global filters to the second dialog box (for editing).
Note: If the vertical or horizontal scroll bars appear in your dialog boxes (possibly you have a font > 9), you can increase the size of the "inputselect" box. Look for the 2 inputselect statements in the script and adjust the x,y dimensions as necessary.
Version 2.4:
1) Moved the "Visual Filters" and "Global Visual Filters" List Management items from "edit" dialog (2nd) to the "clear" dialog (1st). Since these two List Management items are now in the "clear" dialog, you should consider making sticky sections if you have any that you'd like to maintain or make Power Filters. The script will not delete any items in the sticky section.
2) In testing I noted a problem with the resultant data (filters) in List Management if/when the filter contained a "=" sign (e.g., <=, >=) in the filter - fixed.
Version 2.41:
1) Corrected situations where "Recent Locations" would not be properly processed because the script did not recognize a key in section [mrubrowse] for "Latest=".
It should be noted that changes in "Recent Locations" [mrubrowse] will not be reflected in XYplorer until a Save is accomplished and a "Save" will not be flagged as being required (i.e., the green "Save" button will not turn brown).
2) Also came across an editorial error that was causing "Files in Clipboard" not to appear in the first dialog as it should have.
Once again, please let me know if you experience any problem. Thank you for trying it out.
Version 2.5:
Updated to:
(1) Add new List Management item - Live Favorite Filters
(2) Clear history on pane 2, or I should say, the other pane
(3) Added an option for the second dialog where you can have not only the LM items with content flagged, but you can also have them prechecked as well
change the variable [$flag] in the script as follows:
set to "0" to have List Management items (with content) flagged with a "•" or
set to "1" to have LM items with content pre-checked as well.
(4) I have noticed on my computer that the items in the first LM dialog box that have an mru line would not be deleted below the mru line as they should. Those sendkeys steps involve cutting and pasting. If you have that issue, it may be due to a clipboard management program, if you use one. I use Clipjump (written in AHK). When I changed my cut and paste feature to use Win-C and Win-V instead of control-C and V, the script sendkey steps worked fine. Another option would be to temporarily disable a clipboard management program.
Thanks hermhart, Stef123, Sammay, and highend for the comments.
Thanks,
Ken
Latest version: 2.5
Application | Use: Make a customized toolbar button (CTB) to replace both the built-in Configuration and List Management buttons with one CTB - left click for Tools Configuration and right click to use this script for List Management House Cleaning. Obviously this is not a big deal, I only wanted to make access quicker for clearing or editing multiple List Management items. I initially wasn't going to bother uploading, but then I figured maybe someone else can get some use out of it.
Version 2 of ListManagementHouseCleaning.xys will now:
1) First the script will display List Management items to select for complete clearing (see screen capture - picture on left) and will then automatically clear all you've selected. This dialog list contains the typical MRU type lists that if you delete all is hell is not going to break out.
2) Next it will provide you with another dialog of List Management items (see screen capture - picture on right) from which you can select the items you which to edit one by one in succession (though you can also clear them). This dialog contains the more important List Management items like Favorite Folders or Portable File Associations.
3) Lastly, the script will ask you if you'd like to save the changes. If you elect not to, that's alright, but the changes you've made will not be saved if you exit later without saving.
Notes:
1) If you'd rather not automatically clear any List Management items in the first dialog simply click on "OK" or press "Enter" to proceed on to the next dialog to edit List Management items.
2) You see the screen flicker for a a second or two after the first dialog while the script clears the List Management items you've selected. How long it flickers depends on how many you've selected.
3) I could have done this in a 2nd instance of XY, but there are too many complications and annoyances doing that such as loosing focus of the first XY instance.
4) If you'd rather have one particular List Management item in the "Clear" list instead of the "Edit" list or visa versa, you can easily swap them in the script. The items in the two lists were my own quick personal preference. You could place all the List Management items in the second "Edit" dialog if you'd like. Version 2.1:
1) In the Clear List Management items dialog, the script will pre-check any items which have content (i.e., those that aren't void of entries).
2) In the Edit List Management items dialog, the script flag all items which have content. The flag is a big fat dot. I purposely did not pre-check the items having content as I did in the clear dialog. I didn't want to open all of these List Management item dialogs automatically unless the user checks them off simply to minimize time opening unnecessary dialogs coupled with the fact that this "Edit" dialog contains much more critical lists that the user would not want to accidentally delete or clear.
3) I also rearranged some of the List Management items between the Clear and Edit dialogs to be more in-line with whether the user would want to edit or clear the list.
Thanks highend for the pre-check suggestion.I hope you can get some use out of it. Please let me know if you have any suggestions or problems.
Version 2.2:
1) It will now recognize the Sticky Section - mru items above the mru line "-----> mru" will be preserved. As it states in the help file, "Items in the Sticky Section are permanent members of this list and will never be pushed out when new items are added." The script will only delete the mru's below the mru line.
2) Took care of a couple of local references to my personal XY folder instead of using <xydata>.
As I mentioned in a previous post, I kept the 3 MRU lists, RenameSpecial, mruBatchRename, mruRegExpRename in the edit list dialog not in the auto clear list dialog. Those seem too important to wipe out (clear) if someone does not have sticky sections established.
Sorry for being ignorant on the Sticky Section of mru list when I initially wrote this (thanks hermhart). I obviously hadn't been taking advantage of the feature.
Version 2.3:
1) Added the "e" flag to formatlist to prevent any blank items in a List Management.
2) Took advantage of the new "e" flag in the foreach loops which skips or disregards any empty or blank items in the foreach list. You will need version v15.70.0118 or later.
3) Added an initial save dialog in the beginning to ensure the users settings are saved prior to continuing in List Management House Cleaning. If you don't want to see it or you save frequently anyway, you can comment it out if you'd like.
4) Recognized if the user does not have a tag.dat file in <xydata>.
5) Modified the script to recognize if the user did not make any selections in either dialog box or cancelled out of both dialogs. The script will not prompt the user to save settings at the end of the script.
6) Added the new global filters to the second dialog box (for editing).
Note: If the vertical or horizontal scroll bars appear in your dialog boxes (possibly you have a font > 9), you can increase the size of the "inputselect" box. Look for the 2 inputselect statements in the script and adjust the x,y dimensions as necessary.
Version 2.4:
1) Moved the "Visual Filters" and "Global Visual Filters" List Management items from "edit" dialog (2nd) to the "clear" dialog (1st). Since these two List Management items are now in the "clear" dialog, you should consider making sticky sections if you have any that you'd like to maintain or make Power Filters. The script will not delete any items in the sticky section.
2) In testing I noted a problem with the resultant data (filters) in List Management if/when the filter contained a "=" sign (e.g., <=, >=) in the filter - fixed.
Version 2.41:
1) Corrected situations where "Recent Locations" would not be properly processed because the script did not recognize a key in section [mrubrowse] for "Latest=".
It should be noted that changes in "Recent Locations" [mrubrowse] will not be reflected in XYplorer until a Save is accomplished and a "Save" will not be flagged as being required (i.e., the green "Save" button will not turn brown).
2) Also came across an editorial error that was causing "Files in Clipboard" not to appear in the first dialog as it should have.
Once again, please let me know if you experience any problem. Thank you for trying it out.
Version 2.5:
Updated to:
(1) Add new List Management item - Live Favorite Filters
(2) Clear history on pane 2, or I should say, the other pane
(3) Added an option for the second dialog where you can have not only the LM items with content flagged, but you can also have them prechecked as well
change the variable [$flag] in the script as follows:
set to "0" to have List Management items (with content) flagged with a "•" or
set to "1" to have LM items with content pre-checked as well.
(4) I have noticed on my computer that the items in the first LM dialog box that have an mru line would not be deleted below the mru line as they should. Those sendkeys steps involve cutting and pasting. If you have that issue, it may be due to a clipboard management program, if you use one. I use Clipjump (written in AHK). When I changed my cut and paste feature to use Win-C and Win-V instead of control-C and V, the script sendkey steps worked fine. Another option would be to temporarily disable a clipboard management program.
Thanks hermhart, Stef123, Sammay, and highend for the comments.
Thanks,
Ken
Latest version: 2.5