There is already a CEA Switch Tabs, but that effects only the selected tab(the one you switched to). So i propose additional CEA Before Switch Tabs, that would allow to effect the "old tab"(one you switch from) = the selected effect/scripts happens right before switch and only then focus goes to newly selected tab.
Just like there there are CEAs for actions after Start and before Exit of XY, this would provide quite a lot of possibilities Before making a tab's switch.
CEA Before Switch Tabs
-
eil
- Posts: 1864
- Joined: 13 Jan 2011 19:44
CEA Before Switch Tabs
Win 7 SP1 x64 100% 1366x768|1900x1080
-
admin
- Site Admin
- Posts: 66083
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
eil
- Posts: 1864
- Joined: 13 Jan 2011 19:44
-
admin
- Site Admin
- Posts: 66083
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
eil
- Posts: 1864
- Joined: 13 Jan 2011 19:44
-
eil
- Posts: 1864
- Joined: 13 Jan 2011 19:44
Re: CEA Before Switch Tabs
Code: Select all
+ SC tab enhanced: The operation "get" got a new data parameter "IDprev". On or after
a tab switch it returns the ID of the previously selected tab. Initially (after
startup, before any tab switch) the value defaults to 1. The value can be used e.g.
in the Custom Event Actions "Before browsing a folder" or "Switch tabs".
Example:
echo "Tab ID " . tab("get", "IDprev") . " to " . tab("get", "ID");Win 7 SP1 x64 100% 1366x768|1900x1080
-
admin
- Site Admin
- Posts: 66083
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
eil
- Posts: 1864
- Joined: 13 Jan 2011 19:44
Re: CEA Before Switch Tabs
Too bad, probably they didn't stumble upon situation when some checks/operations need to be done in tab before switching. 
Cause there are lots of scenarios for it. Say check location on switch and if it's "special" - move all specified files to other location, or if it's "temp_work" - delete all specified as temporary. Another variant when auto-save for paper folders is disabled: check for changes on tab switch and note user, prposing to save that p.file before tab is switched and changes lost.
Cause there are lots of scenarios for it. Say check location on switch and if it's "special" - move all specified files to other location, or if it's "temp_work" - delete all specified as temporary. Another variant when auto-save for paper folders is disabled: check for changes on tab switch and note user, prposing to save that p.file before tab is switched and changes lost.
Win 7 SP1 x64 100% 1366x768|1900x1080
XYplorer Beta Club