tab("get", "index", -1)

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
Evolve
Posts: 354
Joined: 27 Feb 2020 09:48

tab("get", "index", -1)

Post by Evolve »

Hey guys, what’s going on. I've been busy recently and have missed a couple of updates. I've updated from v23 to v27 and some of my scripts broke cause of this line of code that finds the last tab index:

msg(tab("get", "index", -1));

Tab name not found

highend
Posts: 14939
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: tab("get", "index", -1)

Post by highend »

Code: Select all

v25.00.0213 - 2023-10-27 16:44
    + SC tab enhanced: Instead of the index, you can now pass the caption or the path of
      the tab. Tabs are searched from left to right, the first match wins.
      Syntax: tab([operation], [data], [index], [ID])
        index:  Refers to a tab by its position, first tab = 1.
                Alternatively pass the name (if you named the tab via "Rename Tab...") or
                the path. Wildcards * and ? are supported.
                Defaults to the current tab. See also individual descriptions above under
                each operation.
      Remarks:
        - The matching is case-insensitive (A==a).
        - If there is no match, an error message "Tab name not found" is displayed and no
          operation is performed.
      Examples:
        tab("close", , "Mickey");       //close first tab called "Mickey" (no prompt)
        tab("close", , "Desktop\Desk"); //close first tab pointing to "Desktop\Desk" (no prompt)
        echo tab("get", "ID", "*23");   //get ID of first tab whose name ends with "23"
One of my scripts helped you out? Please donate via Paypal

altoclef
Posts: 99
Joined: 12 Oct 2012 18:54
Location: Win11 24H2 @100%

Re: tab("get", "index", -1)

Post by altoclef »

Evolve wrote: 13 May 2025 06:31 msg(tab("get", "index", -1));

Tab name not found
Errors for me too.

tab() help says:
Notes
If index is negative then position is calculated from the right end (-1 points to the right-most tab).
and includes the example tab("lock", , -1); which also fails for me with the same error message.

admin
Site Admin
Posts: 66220
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: tab("get", "index", -1)

Post by admin »

That's a bug. :bug: Fixed in next beta. :tup:

altoclef
Posts: 99
Joined: 12 Oct 2012 18:54
Location: Win11 24H2 @100%

Re: tab("get", "index", -1)

Post by altoclef »

Confirmed fixed in v27.00.0503. Thank you. :tup:

Post Reply