I use the quick search field on the top right a lot. Is there a way to save the text you type there and put it in a button?
I want a button that when I press, do a quick search of folder.jpg for example. It should quick search the current and sub folders as quick search does.
I need a little more help than it's possible, few lines of the commands please.
If you mean you want to clear the text from the search field (top right of the toolbar), I think that should happen automatically when you navigate away from the search results.
No, it is persistent until you click the little x in the field. I want to clear the text so the results in the window are also cleared back to before the quick search. I want to do that with a button and not to click on the x.
No I mean what should I write so it can detect the 2 states? what commands should I write. For example this also doesn't work. I know I have to put a condition after each icon.
I just spent 6 hours and was not able to find a solution. Now I have come to the conclusion of instead of changing the icons, I better use toggle instead. So I have to write
@toggle:if
the condition as Leo wrote would be @ifpath:coll://%%Lister-Quick-Find-Results%%
But still I'm unable. How to say check if the path is
coll://%%Lister-Quick-Find-Results%% after @toggle: ?
There isn't a (good) way to change a button's appearance based on the current path.
(Other than to completely hide or disable the button, which wouldn't make sense here. Unless you had two separate buttons with different looks and swapped between the two, which would work. @hideifpath can do that.)
If the issue is that you want a clear way to tell when you're looking at search results rather than a normal folder, setting a background color for search results might be a better method. If that sounds like what you want, you can do it via Preferences / Folders / Folder Formats:
Ok, what about making a variable and changing that variable to 0 and 1 each time you press the button? Then use that variable to see if it's 0 or 1 and toggle based on that?
You could do that, but then if you navigated via any other method the variable would be out of sync. Unless you wrote a script which reacted to folder change events and updated the variable. (But is this really worth that complexity? You can see you're in search results via the path field, the search field, and the background color if you wanted it. Does the button need to toggle as well?)