Page 1 of 1

Is there an option to save search settings?

Posted: 30 Aug 2018 22:28
by John_C
For example, I oftenly need to make a search inside all my documents.

That's mean, I need to scan doc, docx, docm, txt, md, mmd, rtf, htm, html and some another document-related files. As you see, there are a lot of extensions and it's not easy to keep them in mind.

So, I'm wondering is there a feature to save search parameters, probably somewhere in catalog. You press some button - and then search panel with all proper settings will be opened:
search.PNG

Re: Is there an option to save search settings?

Posted: 30 Aug 2018 22:51
by highend

Code: Select all

help "idh_searchtemplates.htm";
and you know that the delimiter in the name field is not a comma, do you?

Re: Is there an option to save search settings?

Posted: 30 Aug 2018 23:06
by John_C
highend wrote:

Code: Select all

help "idh_searchtemplates.htm";
and you know that the delimiter in the name field is not a comma, do you?
Thanks! Yes, semicolon, it was an old screenshot

Re: Is there an option to save search settings?

Posted: 30 Aug 2018 23:24
by John_C
highend wrote:

Code: Select all

help "idh_searchtemplates.htm";
and you know that the delimiter in the name field is not a comma, do you?
Here is what I'm trying to achieve:

Code: Select all

// if "find files" pane at the bottom of the window is not opened {
    #260; // Open this pane
    #264; // Open search templates window
} else {
    #264;
}
Is it hard to write such condition?

Re: Is there an option to save search settings?

Posted: 30 Aug 2018 23:37
by highend
Sure, look at

Code: Select all

savesettings
and after writing the XYplorer.ini to a temp file, read the ShowInfoPanel
entry from the [Layout] section of it. Additionally you need the LastTab
entry from the [General] section. It needs to be 6, otherwise a different
tab is displayed...

Re: Is there an option to save search settings?

Posted: 30 Aug 2018 23:59
by John_C
highend wrote:Sure, look at

Code: Select all

savesettings
and after writing the XYplorer.ini to a temp file, read the ShowInfoPanel
entry from the [Layout] section of it. Additionally you need the LastTab
entry from the [General] section. It needs to be 6, otherwise a different
tab is displayed...
Thanks! Here is my code. Is it correct?

Code: Select all

"Open Search Templates Window"
    savesettings 1, "temp.ini"; // Not sure here should be "1". Is it correct?

    $lastTab = getkey("LastTab", "General", "temp.ini");
    $showInfoPanel = getkey("ShowInfoPanel", "Layout", "temp.ini");

    if ($lastTab != 6) || ($showInfoPanel != 1) { #260; } // Shouldn't we use ($lastTab != 6 || $showInfoPanel != 1) instead?
    #264;