Elaborating script if <curtab> is “search tab” run this command, if any other tab, run that...

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
cadu
Posts: 287
Joined: 18 Mar 2012 21:50

Elaborating script if <curtab> is “search tab” run this command, if any other tab, run that...

Post by cadu »

Hi,

I'd appreciate your help to elaborate a script syntax based on the condition:

if <curtab> is “search tab”, run command #1
if <curtab> is any other tab, then run #2

I started working on a syntax, but lacks me some commands “???”:

Code: Select all

    if (exists(<curtab>) == 1 && gpc(<curtab>, "???") LikeI "???") { #1; }
    else { #2; }
Thank you very much!


Search tab.png
Search tab.png (12.2 KiB) Viewed 767 times

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Elaborating script if <curtab> is “search tab” run this command, if any other tab, run that...

Post by highend »

look at tab("get", "mode")...

Doesn't distinguish between a normal search / quicksearch result but should be enough
One of my scripts helped you out? Please donate via Paypal

cadu
Posts: 287
Joined: 18 Mar 2012 21:50

Re: Elaborating script if <curtab> is “search tab” run this command, if any other tab, run that...

Post by cadu »

Many thanks for the information @highend.

a) Could you please adapt the "if script" syntax to perform

Code: Select all

tab("get", "mode")
?

b) Would be possible to perform a similar script, but considering the content of the path?
Example: Z:\Folder1\Folder2
if <path?> has "folder 2", run command #1
if <path?> is any other folder, then run #2

I would be glad to donate for that.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Elaborating script if <curtab> is “search tab” run this command, if any other tab, run that...

Post by highend »

Code: Select all

    if (tab("get", "mode") == 1) { #1; }
    else { #2; }

Code: Select all

    if (strpos(<curpath>, "folder 2") != -1) { #1; }
    else { #2; }
One of my scripts helped you out? Please donate via Paypal

Post Reply