To run a script when I click a tab [Solved]

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
John_C
Posts: 336
Joined: 16 May 2018 20:04

To run a script when I click a tab [Solved]

Post by John_C »

I want to run a script when I click a tab.
tabs_xy.png

Code: Select all

"say hi"
  msg("hi");
I have tried

Code: Select all

CEA_TabDoubleClickOnWhite=6
CEA_TabDoubleClickOnWhite_Script="load "say_hi.xys""
But this doesn't make any visible effect to me. When I double click a tab or the tab area (see the clicks on the screenshot below), nothing happens.
clicks.png
This approach, however, successfully works if I try to run the script when I click the whitespace in the List area:

Code: Select all

CEA_ListRightClickOnWhite=6
CEA_ListRightClickOnWhite_Script="load "say_hi.xys""
What I'm doing wrong?
To see the attached files, you need to log into the forum.
Last edited by John_C on 12 Mar 2022 05:25, edited 1 time in total.

jupe
Posts: 3575
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: To run a script when I click a tab

Post by jupe »

You can't just make up theoretical ini key/value pairs, the CEA interface is here:

Configuration | General | Custom Event Actions

only those listed are available.

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: To run a script when I click a tab

Post by John_C »

Now I see, thanks. I wasn't aware the GUI for these things is now added.

Sadly, it seems it is not possible to assign a script to a right click on the tab, which is my real goal.

klownboy
Posts: 4481
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: To run a script when I click a tab [Solved]

Post by klownboy »

You may want to take a look at CEA > Other Events > Switch Tabs as well. Now that's a generic event in that it applies to any tab switching, but you could set up a script that distinguishes what folder you are in or what tab index you are in, and take specific actions based on that location (i.e., tab index 1, you might do this action and tab index 3 do something different).

Post Reply