Clear Search fields

Sorry, I tried searching but couldn't find anything.

The Find panel, "Name matching" and "Containing text" fields, is there a way to clear what was previously typed?

I could never clear it in 9 and can't in 10. I'm sure there is a way but can't find it.

Please help!?
Thanks

See Clear the find fields before searching for more files

Thanks. Not 100% of what I was looking for since I don't want to add an .exe to do this. But it gave me more info of what to look for and figured out how to make my own button to clear the 3 files. Works perfectly for what I need

delete "/dopuslocaldata\State Data\MRU\find_contains.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\find_name.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\find_path.osd" QUIET

Here's my button if anyone wants it (copy code. in Dopus; Settings -> Customize, right-click -> paste on any empty toolbar spot. Edit button to change icon/wording to your liking)

<?xml version="1.0"?>
<button backcol="none" display="both" separate="yes" textcol="none">
	<label>Clear Search History</label>
	<tip>Clear Search History</tip>
	<icon1>#clearfilters</icon1>
	<function type="normal">
		<instruction>delete &quot;/dopuslocaldata\State Data\MRU\find_contains.osd&quot; QUIET</instruction>
		<instruction>delete &quot;/dopuslocaldata\State Data\MRU\find_name.osd&quot; QUIET</instruction>
		<instruction>delete &quot;/dopuslocaldata\State Data\MRU\find_path.osd&quot; QUIET</instruction>
	</function>
</button>

Thanks

Actually that doesn't seem to work 100%. IDK.

Wish Dopus would just put in a right-click -> Clear history like they did on the Filter box.

It may only work when the Find / Utility panel is closed.

That was it! Thanks Leo

For anybody who may come upon this thread later:

I guess it wasn't 100% what you were looking for for another reason. If what you showed does what you wanted, you apparently wanted to clear the history. The code at the link I supplied causes the fields to be empty the next time Find is invoked, but the history is still there in the drop-down. Your code clears the history, but the last used values are still pre-filled when Find is invoked. Either one is potentially useful, but they're not interchangeable.

I looked into this because I thought I might adopt what you provided for one of the reasons you stated, namely it's completely within Opus, but I soon discovered it provides a different function.

(These observations apply to Opus 9. I don't know about Opus 10 which I haven't quite gotten around to install).

Yes, I noticed that. It only cleared the history and not the field itself. So I found a few more files to delete and now the fields are empty as well. BUT it only worked when the find panel was closed like Leo said.

I have no idea if I'm deleting to many files or not. All I know is it all works as long as the find panel is closed and I'm happy with the results :slight_smile:

Thanks bob.

Here is what I'm deleting now

delete "/dopuslocaldata\State Data\outputwindow.osd" QUIET
delete "/dopuslocaldata\State Data\find.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\find_contains.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\find_name.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\find_path.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\select.osd" QUIET

I also created a new "Find Files (clear history first)" button so the above code is launched first before the Find panel is opened. So now when I invoke the Find Files panel, it clears it out first. Here's that code.

delete "/dopuslocaldata\State Data\outputwindow.osd" QUIET
delete "/dopuslocaldata\State Data\find.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\find_contains.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\find_name.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\find_path.osd" QUIET
delete "/dopuslocaldata\State Data\MRU\select.osd" QUIET
Set UTILITY=Find,Toggle

and the button

<?xml version="1.0"?>
<button backcol="none" display="both" hotkey="ctrl+F" label_pos="right" textcol="none">
	<label>&amp;Find Files (clear history first)\tCtrl+F</label>
	<tip>Search for files by name, contents or other criteria</tip>
	<icon1>#find</icon1>
	<function type="normal">
		<instruction>delete &quot;/dopuslocaldata\State Data\outputwindow.osd&quot; QUIET</instruction>
		<instruction>delete &quot;/dopuslocaldata\State Data\find.osd&quot; QUIET</instruction>
		<instruction>delete &quot;/dopuslocaldata\State Data\MRU\find_contains.osd&quot; QUIET</instruction>
		<instruction>delete &quot;/dopuslocaldata\State Data\MRU\find_name.osd&quot; QUIET</instruction>
		<instruction>delete &quot;/dopuslocaldata\State Data\MRU\find_path.osd&quot; QUIET</instruction>
		<instruction>delete &quot;/dopuslocaldata\State Data\MRU\select.osd&quot; QUIET</instruction>
		<instruction>Set UTILITY=Find,Toggle</instruction>
	</function>
</button>

I think the MRU files are related to the history. The find.osd file is the same one that's manipulated by the AutoHotkey code. Not only don't I know whether you're deleting too many files. I don't know whether you're dong too much by deleting the whole find.osd file. I may experiment with this.

I see that deleting find.osd resets, perhaps among other things, source (new tab) as where to show results, so I won't be switching to the simplified version of this.

Ahh yes, you are correct. That's something I never cared about since the default is what I always used.