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: 251
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 » 23 Oct 2019 13:08

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 316 times

highend
Posts: 9268
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 » 23 Oct 2019 17:06

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 or paypal_donate (at) stdmail (dot) de

cadu
Posts: 251
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 » 24 Oct 2019 14:21

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: 9268
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 » 24 Oct 2019 14:30

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 or paypal_donate (at) stdmail (dot) de

Post Reply