Page 1 of 1

Determine whether List Management items have any entries

Posted: 09 May 2015 00:06
by klownboy
To support an update to my ListManagemntHouseCleaning Script http://www.xyplorer.com/xyfc/viewtopic. ... 48#p123298 I want to determine if any of the List Management items are void of any entries. The majority I have found in XYplorer.ini (e.g., Highlighted Folders is section HiliteFolder, Recently Included Catalogs is section mruCatalogsIncludedNow). So I can easily get the count using SC getkey and determine if there are any entries (i.e., if the count is "0"). However there are a number of ListManagement items I don't see in XYplorer ini. Does anyone know if I can obtain this information elsewhere or if some are indeed in XYplorer.ini and I just don't see them? These are the ListManagement items I don't see or they're not immediately apparent in XYplorer.ini (to me anyway). Thanks.

Code: Select all

618|History|
630|Mini Tree|
631|Recent Locations|
632|Recently Opened Files|
615|Find Files: Name|
616|Find Files: Location|
617|Find Files: Excluded Items|
638|Quick Search|
626|Servers in Network Folder|
635|Tag List|
637|Tagged Items|
625|Files in Clipboard| 

Re: Determining whether List Management items have any entri

Posted: 09 May 2015 07:39
by admin
Quickly some of them. Finding the right pane.ini might be difficult...

Code: Select all

[pane.ini]
618|History|  =  History

[xyplorer.ini]
630|Mini Tree|  = MiniTreePaths
631|Recent Locations = mruBrowse
632|Recently Opened Files|s = mruOpenedItems
615|Find Files: Name| = Named
616|Find Files: Location| = LookIn
617|Find Files: Excluded Items| = ExcludeFolders2

Re: Determining whether List Management items have any entri

Posted: 09 May 2015 07:59
by highend
I think a problem for Ken is that some of these are kept in memory and are only visible to a script when the settings are getting saved?

Re: Determining whether List Management items have any entri

Posted: 09 May 2015 08:16
by admin
There is always the possible difference between state in memory and state on disk. He said he uses SC getkey so I thought he wants state on disk.

Re: Determining whether List Management items have any entri

Posted: 09 May 2015 13:25
by klownboy
Thanks Don and highend. I mentioned using SC getkey only because I'm not aware of possible other methods other than using SC get for some items like get("list_recentlocations") and get("list_recentlyopenedfiles") and I suppose they pull from memory.

Don I searched through my XYplorer.ini and have no section for mruBrowse, mruOpenedItems, Named, or LookIn. I tried other variations of the words as well.

History will always have at least one entry since as soon as you delete all your history entries via List Management, the current folder will be there when you return. So I'm not going to worry about that one since it will never be blank.

I know I can find the applicable pane.ini by determining the current tabset (e.g., Tabset1=) in XYplorer, but I don't see useable List Management information in the pane.ini anyway.

I even tried putting in some bogus information some list Management items like Quick Search and Find and then searched through the ini files and found nothing. :veryconfused:

So highend, it looks like the nice idea of flagging any List Management items which are empty in the script may not be as easy as I thought. Though I suppose I could flag the ones I can obtain.

Thanks,
Ken

Re: Determining whether List Management items have any entri

Posted: 09 May 2015 15:02
by bdeshi
klownboy wrote:Don I searched through my XYplorer.ini and have no section for mruBrowse, mruOpenedItems, Named, or LookIn. I tried other variations of the words as well.
[...]
I even tried putting in some bogus information some list Management items like Quick Search and Find and then searched through the ini files and found nothing. :veryconfused:
Their existence depends on the setting Tools > Configuration > Startup & Exit > Include most-recently-used lists on save, and it's sub-options (the "Apply to" btn).

Re: Determine whether List Management items have any entries

Posted: 09 May 2015 16:30
by klownboy
Thanks Sammay. You are the guru of ini files...remembering your work with pane data. :) I indeed had a few of those items in configuration unchecked so they didn't show up in XYplorer.ini. They do now!

List Management items like Mini Tree... which is Settings | "MiniTreePaths=" has no "count" value like most of the other LM items. Strange though like "History" after clearing all entries in LM | Mini Tree..., the list is always "C:\" when I return to it. So it appears it's never really blank in XYplorer.ini.

"Servers in Network Folder" is located in servers.dat. I'm not going after that since it's binary.
Tag List is in the XYplorer.ini file under Settings | "TagsList=" but Tagged Items are in the tags.dat file which is also binary.

Any ideas "Files in Clipboard" and how I could determine if it's void of entries? I copied a file to the clipboard. It shows in LM | Files in Clipboard, but I don't see where the information is stored unless it's just in memory.

Re: Determine whether List Management items have any entries

Posted: 09 May 2015 19:44
by bdeshi
:ugeek:

MiniTreePaths= is only a key. I suppose it's directly used with something internal similar to SC loadtree (if not itself) to populate the tree, hence no need for count or latest etc.

tags.dat is not binary. And there's no promise that recently used tags will all be stored in tags.dat. It saves only those that are applied to at least one file. (Well, it actually records tagged files, one per line)

file in clipboard: it's directly retrieved from the clipboard.

Code: Select all

::if gettokenindex('CF_HDROP', get('ClipboardFormats'),,'i') {text "there are these files in clipboard:<crlf 2><clipboard>";} else {echo 'no files in clipboard :( ';}

Re: Determine whether List Management items have any entries

Posted: 09 May 2015 21:22
by klownboy
Thank you Sammay. Some of these List Management items are so fleeting I'm not sure it's worth determining if the item has zero entries.

get('ClipboardFormats') - I see that now in your post on undocumented script commands. I read on a Microsoft site that CF_HDROP is "the clipboard format used when transferring the locations of a group of existing files".

Sorry on the tag.dat. Yes you're right. Most of the dats are binary. I believe at some point awhile back Don converted tag.dat to text if I remember correctly. It doesn't sound like anything tag related should be in an auto clear mode anyway.

Thanks,
Ken