Page 1 of 1

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

Posted: 12 Mar 2022 04:14
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?

Re: To run a script when I click a tab

Posted: 12 Mar 2022 04:47
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.

Re: To run a script when I click a tab

Posted: 12 Mar 2022 05:25
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.

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

Posted: 12 Mar 2022 12:42
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).