Page 1 of 1

Script to switch between tabs

Posted: 09 Oct 2022 09:34
by GSComputer
Hello,
I'm new in writing scripts.

I created several Tabs and named them: Selection 1, Selection 2, Selection 3 and so on.
Now I would like to have a user defined Button, where I can diectly switch between the tabs: (button 1 __ Selection 1) and so on.

Can someone help me?
Thanks in advance
Gerhard

Re: Script to switch between tabs

Posted: 09 Oct 2022 09:45
by highend

Code: Select all

    $menu = "";
    while ($i++ < gettoken(<get tabs>, "count", "|")) { $menu .= tab("get", "name", $i) . "|" . $i . "|" . tab("get", "path", $i) . <crlf>; }
    $id = popupmenu($menu, 6:=<crlf>, 7:="|");
    if ($id) { seltab $id; }

Re: Script to switch between tabs

Posted: 09 Oct 2022 10:04
by GSComputer
Thanks, that is another good idea, but not what I really want. I think it is my bad english.
I created several TAB groups named selection 1 and so on.
Each button should represent a Tabgroup. So I can easily switch/change between the several Tabgroups.

Deutsch:
Ich habe verschiedene Tabgruppen, und sie Auswahl 1 Auswahl2 und Auswahl 3 benannt.
Nun möchte ich jeweils eine eigene Befehlsschaltfläche für Auswahl 1 Auswahl 2 ud Auswahl 3 erstellen, um ein schnelles Umschalten zwischen den Tabgruppen ermöglichen
Wer kann mir dabei helfen.
Danke
Gerhard

Re: Script to switch between tabs

Posted: 09 Oct 2022 10:13
by highend
Are you talking about Tabsets?

Re: Script to switch between tabs

Posted: 09 Oct 2022 10:20
by GSComputer
highend wrote: 09 Oct 2022 10:13 Are you talking about Tabsets?
yes
sorry my english

Re: Script to switch between tabs

Posted: 09 Oct 2022 10:23
by highend
tabset("load", "<Name des jeweiligen tabsets>");

Re: Script to switch between tabs

Posted: 09 Oct 2022 10:51
by RalphM
Why don't you just use the existing tabset toolbar button to select which tabset should be loaded?!
PicPick_715.jpg

Re: Script to switch between tabs

Posted: 09 Oct 2022 10:53
by GSComputer
highend wrote: 09 Oct 2022 10:23 tabset("load", "<Name des jeweiligen tabsets>");
Das klappt nicht schakltet auf C:\
Name des Tabsets = Zeitungen
Ich habe als Script eingegeben:
tabset("load", "<Zeitungen>");

Re: Script to switch between tabs

Posted: 09 Oct 2022 10:57
by GSComputer
RalphM wrote: 09 Oct 2022 10:51 Why don't you just use the existing tabset toolbar button to select which tabset should be loaded?!PicPick_715.jpg
Yes Ralph,
It's easier to have one Button directly. Sure your proposal Works.
It should be a first beginning for me to work with scripts.

Re: Script to switch between tabs

Posted: 09 Oct 2022 11:23
by highend
It denotes a variable...

tabset("load", "Zeitungen");^^

Re: Script to switch between tabs

Posted: 09 Oct 2022 11:42
by GSComputer
Danke das war was ich wollte