Move tab to first position on the panel

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
igarny
Junior Member
Junior Member
Posts: 58
Joined: 2023-01-26, 19:01 UTC

Move tab to first position on the panel

Post by *igarny »

Hi guys,

Please tell, if there is any way to tell TC to move a tab to the left multiple times in a single command. The ultimate goal is to move a tab to the 1st position in the active panel.
I know the command to move the tab to the left: cm_MoveTabLeft
but I also understand that this command doesn't accept parameters from this post of @Petermad: viewtopic.php?t=76713
which would practically enable me to jump to the 1st position directly from the first call of the function...

So I was wondering, if there is some other solution = script, which would amend the missing function and obsolete a request for a feature implementation

Many thanks for the great support!
Fla$her
Power Member
Power Member
Posts: 2250
Joined: 2020-01-18, 04:03 UTC

Re: Move tab to first position on the panel

Post by *Fla$her »

Yes, this can be done correctly using TCFS2 + TCFS2Tools:

Code: Select all

%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef loop(if(tcm(65580+tcm(65552)),tcm(3015)+1))
But if you don't want to rack your brain, you can execute any number of commands separated by commas:
3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,...
Last edited by Fla$her on 2023-03-17, 09:40 UTC, edited 3 times in total.
Overquoting is evil! 👎
igarny
Junior Member
Junior Member
Posts: 58
Joined: 2023-01-26, 19:01 UTC

Re: Move tab to first position on the panel

Post by *igarny »

The links to the plugin are not available any more from: viewtopic.php?p=222666#p222666
broken... because of the war, my guess
3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,...
Doesn't work directly in the Menu config file:

Code: Select all

  MENUITEM "Move Tab to 1st position\tCtrl+PgUp", 3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015
Image: https://ibb.co/hXr88Qc
Fla$her
Power Member
Power Member
Posts: 2250
Joined: 2020-01-18, 04:03 UTC

Re: Move tab to first position on the panel

Post by *Fla$her »

igarny wrote: 2023-03-14, 10:17 UTCbecause of the war, my guess
The war has nothing to do with it. The hosting chosen is lousy. Download here: TCFS2 and TCFS2Tools.
igarny wrote: 2023-03-14, 10:17 UTCDoesn't work directly in the Menu config file:
MNU doesn't support command combinations. There you need to use em_ with this combination.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14742
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Move tab to first position on the panel

Post by *petermad »

2igarny

The dirty way is to just make a multi-command like this in your usercmd.ini file

Code: Select all

[em_movetabtostart]
cmd=3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015
em_movetabtostart can then be used in the menu and in buttons or for a keyboard shortcut
Last edited by petermad on 2023-03-16, 12:22 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2250
Joined: 2020-01-18, 04:03 UTC

Re: Move tab to first position on the panel

Post by *Fla$her »

2petermad
In fact, you are repeating what has already been suggested.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14742
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Move tab to first position on the panel

Post by *petermad »

2Fla$her
Not excactly - it was suggested to use:

Code: Select all

  MENUITEM "Move Tab to 1st position\tCtrl+PgUp", 3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015
Which won'r work since TC doesn't support multi-commands directly in the Menu - hence the suggestion to put the multicommand in an em_command that can be used in the Menu:

Code: Select all

  MENUITEM "Move Tab to 1st position\tCtrl+PgUp", em_movetabtostart
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2250
Joined: 2020-01-18, 04:03 UTC

Re: Move tab to first position on the panel

Post by *Fla$her »

petermad wrote: 2023-03-15, 00:14 UTCit was suggested to use:
Who suggested it? Where? It was offered exactly what you repeated:
Fla$her wrote: 2023-03-14, 11:26 UTC MNU doesn't support command combinations. There you need to use em_ with this combination.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14742
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Move tab to first position on the panel

Post by *petermad »

Fla$her wrote: 2023-03-15, 03:35 UTC MNU doesn't support command combinations. There you need to use em_ with this combination.
Sorry, I overlooked that line :oops: Anyway: "There you need to use em_" might not mean much to the reader, so I don't think my more elaborate explanation of the use of em_ does any harm...
Last edited by petermad on 2023-03-15, 14:59 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2250
Joined: 2020-01-18, 04:03 UTC

Re: Move tab to first position on the panel

Post by *Fla$her »

petermad wrote: 2023-03-15, 11:17 UTCso I don't think my more elaborate explanation of the use of em_ does any harm...
I don't consider it a harm in any way. Just you started as if it wasn't offered above. I did not decipher it, because I believe that if a person understands the essence of cm_ and talks about scripts, then there should be no problems with em_.
Overquoting is evil! 👎
User avatar
HerbieH
Member
Member
Posts: 145
Joined: 2003-02-11, 10:04 UTC

Re: Move tab to first position on the panel

Post by *HerbieH »

to petermad

Code: Select all

[em_movetabtostart]
cmd=3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,3015,
The last comma at the end of the cmd= line triggers an error message.
If you remove the last comma, all is fine :wink:
HerbieH*
-Keep on makin' music!
User avatar
petermad
Power Member
Power Member
Posts: 14742
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Move tab to first position on the panel

Post by *petermad »

2HerbieH
Thanks - I have now edited my previous message.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: Move tab to first position on the panel

Post by *sa16 »

Using TCFS2 and TCFS2Tools:

Code: Select all

TCFS2 /ef "if(tcm(tt_LeftTabIndex+R_isActive), loop(tcm(tt_LeftTabIndex+R_isActive)-1 + tcm(3015)))"
No redundant calls to command 3015.

Or, so as not to bother TC with repeated queries about the index of the active tab:

Code: Select all

TCFS2 /ef "varset(1,tcm(tt_LeftTabIndex+R_isActive)) if(varget(1), loop(@-varget(1)-1 + tcm(3015)))"
Last edited by sa16 on 2023-03-17, 11:10 UTC, edited 1 time in total.
Fla$her
Power Member
Power Member
Posts: 2250
Joined: 2020-01-18, 04:03 UTC

Re: Move tab to first position on the panel

Post by *Fla$her »

sa16 wrote: 2023-03-17, 08:17 UTCNo redundant calls to command 3015.
I always thought that indexing in TCFS2Tools always starts with 0. Made smarter in my shorter no-frills command.

I think it would also be useful to share the inverse command:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef loop(if(tcm(65580+tcm(65552))+1<tcm(65582+tcm(65552)),tcm(3016)+1))

wciconex.dll,300
Move the active tab to the end
Last edited by Fla$her on 2023-03-18, 12:00 UTC, edited 1 time in total.
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 215
Joined: 2021-09-10, 07:15 UTC

Re: Move tab to first position on the panel

Post by *sa16 »

Move tab to end position on the panel:

Code: Select all

TCFS2 /ef "varset(1,tcm(tt_LeftTabCount+R_isActive)-1-tcm(tt_LeftTabIndex+R_isActive)) if(varget(1), loop(@-varget(1)-1 + tcm(3016)))"
Post Reply