Page 1 of 1

CEA"Before browsing a folder": tab("get", "ID") does not return expected value

Posted: 01 Jan 2025 15:14
by Nolan
XY: v26.70.0307

Steps to reproduce:
1) Open 2 tabs named A and B.
2) In A, run echo tab("get", "ID"); in Address Bar to get A's ID, then close the popup.
3) In B, run echo tab("get", "ID"); in Address Bar to get B's ID, then close the popup.
4) Make A the current tab.
5) Under Cfg > General > CEA > Changing Locations > Before browsing a folder, set Action as "Run Script":
echo tab("get", "ID");
6) Left-click B tab, then the popup shows B's ID, not expected A's.

By the way, if A has Visual Filter "a", B has Visual Filter "b", assigning the code below as the Action script of "Before browsing a folder" :

Code: Select all

echo get("VisualFilter") . "|" . tab("get", "filter");
and then making a switching from A to B, will popup this text content: "a|b". Shouldn't get("VisualFilter") and tab("get", "filter") return the same value?

Re: CEA"Before browsing a folder": tab("get", "ID") does not return expected value

Posted: 01 Jan 2025 16:43
by admin
Everything works as it should. It's "Before browsing a folder", not "Before switching tabs".

Re: CEA"Before browsing a folder": tab("get", "ID") does not return expected value

Posted: 01 Jan 2025 18:16
by Nolan
I also mentioned get("VisualFilter") returns A's stuff, while tab("get", "filter"), like tab("get", "ID"), returns B's stuff.
Why get("VisualFilter") and tab("get", "filter") work in non-unified/different "current" tabs, when "Before browsing a folder"?

Re: CEA"Before browsing a folder": tab("get", "ID") does not return expected value

Posted: 01 Jan 2025 18:44
by admin
get("VisualFilter") return the list filter, and tab("get", "filter") returns the tab filter. In that moment the tab is already new, but the list still old.

Re: CEA"Before browsing a folder": tab("get", "ID") does not return expected value

Posted: 01 Jan 2025 19:26
by Nolan
OK. Thanks for the explain. So how to get A's (old/previous tab's) ID when "Before browsing a folder"?
I can use get("VisualFilter") to get A's (old/previous tab's) VFilter when "Before browsing a folder", but how to get A's (old/previous tab's) ID? Is there any way?

Re: CEA"Before browsing a folder": tab("get", "ID") does not return expected value

Posted: 01 Jan 2025 19:37
by admin
Not really.

What are you trying to do?

Re: CEA"Before browsing a folder": tab("get", "ID") does not return expected value

Posted: 01 Jan 2025 20:12
by Nolan
Not really? You mean it is impossible currently? So this should be a wish for new feature? I want to get old/previous tab's ID when "Before browsing a folder" for more automatic/perfect tabs operation.

Re: CEA"Before browsing a folder": tab("get", "ID") does not return expected value

Posted: 01 Jan 2025 20:25
by admin
It's possible, but in a more complicated way.

"more automatic/perfect tabs operation" is too abstract to create helpful ideas from others.