Page 1 of 1
load search template and open search box directly
Posted: 18 Jun 2014 21:00
by yusef88
can i load search template and open search box directly instead press ctrl+f then load template
Re: load search template and open search box directly
Posted: 18 Jun 2014 23:02
by highend
Scripting would help...
Code: Select all
$template = popupmenu(replace(listfolder("<xydata>\FindTemplates", "*.ini", 4), ".ini"));
loadsearch $template, "x";
#260;
Depending on what you need, you eventually have to edit the "x" (see help file for loadsearch()).
Re: load search template and open search box directly
Posted: 18 Jun 2014 23:42
by yusef88
excellent

your script leads me to read in help file, to load certian template i use this
loadsearch "1", l ;#260;
Re: load search template and open search box directly
Posted: 18 Jun 2014 23:52
by yusef88
why variables like "%computer%" "%programfiles%" don't work in find files
Re: load search template and open search box directly
Posted: 18 Jun 2014 23:54
by highend
For the location field?
%programfiles% works fine for me...
Re: load search template and open search box directly
Posted: 18 Jun 2014 23:58
by yusef88
try it in excluded folders it won't work
Re: load search template and open search box directly
Posted: 19 Jun 2014 00:14
by highend
try it in excluded folders it won't work
You should be able to exclude it when you store it with the template and use the "e" option for loadsearch()
Re: load search template and open search box directly
Posted: 21 Jun 2014 06:15
by yusef88
when using above command can fill search box by words exist in "<clipboard>" or in general start a search with clipboard ?
Re: load search template and open search box directly
Posted: 21 Jun 2014 06:47
by highend
Extend the script by making a temp version of the template and insert what's currently in the clipboard into it and load that one instead.
Re: load search template and open search box directly
Posted: 21 Jun 2014 08:25
by yusef88
mean like this?
but what is the clipboard is variable and change every time i need something similar to that
Re: load search template and open search box directly
Posted: 21 Jun 2014 09:20
by highend
No... Templates don't support variables that you can only get by scripting.
Code: Select all
$template = "<xydata>\FindTemplates\pc.ini";
$content = regexreplace(readfile($template), "^(Named="")([^""]+)", "$1<clipboard>");
writefile($template, $content);
loadsearch getpathcomponent($template, "base"), "l";
Re: load search template and open search box directly
Posted: 21 Jun 2014 16:32
by yusef88
it works perfectly,thanks
