Quick Search Prompt

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
pnoah
Posts: 17
Joined: 04 Aug 2016 16:36

Quick Search Prompt

Post by pnoah »

Hey there, me again :roll:

Can I prevent being prompted:
XYplorer was closed with this Quick Search tab open.
Click the icon to perform the quick search now
or am I bound existentially to give the allowance every restart?

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Quick Search Prompt

Post by highend »

Look it at from this perspective: The result could be different since you quit and restart XY (-> caching doesn't make much sense) and additionally: Imagine you have 10 quicksearches open (when you exit XY). Automatically executing 10 quick searches in parallel when XY is restarted... Probably not the best idea. Why don't you write a script that loads you search templates (you can save them^^) which uses a simple drop down menu -> Two clicks to execute a specific search exactly when you need it...
One of my scripts helped you out? Please donate via Paypal

pnoah
Posts: 17
Joined: 04 Aug 2016 16:36

Re: Quick Search Prompt

Post by pnoah »

I apologize for my shortsighted perspective, of course this makes sense.
Let me explain though: I love working with FluxTorpedoe's Collection Manager Script, as an attempt to tame excessive collections within different folders (even partitions). Now, these finetuned Quick Search results are essential for my workflow and of course I like to make them as 'permanent' (without being static) and customizable as XYplorer allows me to.

About scripting:
Since I just opened the Preface Chapter of "Scripting for 5 year olds" how about I come up with another two or three specifics and delegate an official order to someone more advanced if you know one by any chance. :P

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Quick Search Prompt

Post by highend »

I actually don't use other userscripts :oops: I normally have my own requirements so I write my own script(s) for that purpose...

Knowing someone who can write something for your requirements? Mh, no clue^^ :whistle:
One of my scripts helped you out? Please donate via Paypal

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: Quick Search Prompt

Post by FluxTorpedoe »

pnoah wrote:Can I prevent being prompted:
XYplorer was closed with this Quick Search tab open.
Click the icon to perform the quick search now
or am I bound existentially to give the allowance every restart?
Hi’
   There’s probably a much better way, but in the meantime here’s a dumb brute-force solution (first idea that came to mind).

 • Create a shortcut to XYplorer and add the following command-line switch in the Target field after "…\XYplorer.exe":

Code: Select all

 /script="::#1018;#1060;#802;#1018;#1060;"
 • How it works:
   — We know that XYplorer also refreshes searches when switching between tabs
   — "Cycle tabs forward" with command #1018, then
   — "Open previous tab" with command #1060, so we do a "back and forth" (so a slight flickering is to be expected)
   — "Toggle active pane’ is #802, so we do the switch also for the other pane
   — All the other quicksearch tabs should refresh automatically when you next click on them

Hope this helps.

Have a nice day, 8)
Flux

Edit: Thanks to highend feedback, it seemed doubling 1060 wouldn't work all the time, so I used 1018+1060 instead.

P.S.: Updated "Collection Manager" upcoming in a few…
Last edited by FluxTorpedoe on 08 Aug 2016 15:16, edited 1 time in total.

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Quick Search Prompt

Post by highend »

@FluxTorpedoe

Doesn't work on my system :eh:

What works (on my system) (but this version is only for the active tab):

Code: Select all

xyplorer.exe /script="::while ($i++ < tab('get', 'count')) { seltab +; $t = tab('get', 'term'); if (regexmatches($t, '\?')) { goto $t; }}"
This updates all quicksearches when it runs over all tabs...
One of my scripts helped you out? Please donate via Paypal

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: Quick Search Prompt

Post by FluxTorpedoe »

@highend
Just retried and indeed, there was an script error with doubling 1060 in some cases (and it wouldn’t work on a fresh install)…

  ☛  OTOH, #1018 + #1060 works fine here.

On a fresh install (and with my XY settings too), just clicking on tab is enough to refresh searches. I wonder what setting it is that may prevent it on your version?

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Quick Search Prompt

Post by highend »

I wonder what setting it is that may prevent it on your version?
It wasn't about refreshing, the xy instance (3 quick searches, 4 normal tabs) was left with a single tab after invoking it with the script sequence :9

Maybe a bit more clever (less tab switching):

Code: Select all

xyplorer.exe /script="::$c = tab(); while ($i++ < tab('get', 'count')) { $t = tab('get', 'term'); if (regexmatches($t, '\?')) { seltab $i; goto $t; }} seltab $c;"
One of my scripts helped you out? Please donate via Paypal

Post Reply