Page 1 of 1

Moving (not Copy) a tab to other panel by drag&drop

Posted: 2010-08-22, 12:32 UTC
by Reza
Hi
It may be a good thing if I can
Move a tab from a panel to other panel by drag&drop.
Currently by drag&drop the tab copied to other Panel and I had to close the tab on source panel after copy.
I think it can be move if user pressed Ctrl (or Shift) on drop (or vice versa: copy by Ctrl and Move by default)

thanks a lot

Posted: 2010-08-22, 13:40 UTC
by Vochomurka
I agree.
I've written this script exactly by the same reason. Except that the script supports hot keys and button rather than drag-n-drop :(

Posted: 2010-08-22, 18:28 UTC
by Hacker
Could we not use the same hold left - hold right - release left logic for tab moving?

Roman

Posted: 2010-08-22, 18:38 UTC
by Vochomurka
Of course we could, but we can't yet. Another
MoveTab script comment wrote:good idea to assign the Alt+F6 hotkey to
this command.

I'm using TC 7.55a

Posted: 2010-08-23, 06:47 UTC
by Reza
Vochomurka wrote: Except that the script supports hot keys and button rather than drag-n-drop :(
It is better than i looking for :)
u said "This script for Total Commander 7.0 and older." but I'm using TC 7.55a :cry:

Is there a new version that works on TC7.55a?

Posted: 2010-08-23, 07:18 UTC
by Vochomurka
Is there a new version that works on TC7.55a?
It is the script you are looking at when you open this page :)
If you have version 6.53 that is obviously older than 7.0 you should use this version. Your version 7.55 is for sure NEWER than 7.0, then you should use the main version.
Good luck.

Posted: 2010-08-23, 08:13 UTC
by Reza
It is the script you are looking at when you open this page
2Vochomurka
Yes you are right. I made a mistake :oops:

It works properly.
Thank you

New attempt with TC 9.0a

Posted: 2017-02-11, 15:27 UTC
by t.rauner
-- PUSH --

Hi forum,

I have read a lot of posts here, and I have the exact same problem like descripted by the OP. I would like to have a button on the horizontal or vertical bar that moves the active tab to the other panel and activates the moved tab in the other panel, while the source tab in the source panel is being closed.

I came closer to this scenario with this weird command list:
  • * change the panel
    * open a new tab
    * change the panel back
    * match source (i. e. show current tab folder in previously opened new tab)
    * close current tab
    * change the panel again
To achieve this, I accumulated the following commands under one button (right click the button, "Command" field in "change single button" dialog):

cm_TrgActivateTab10,cm_OpenNewTab,cm_TrgActivateTab10,cm_MatchSrc,cm_CloseCurrentTab,cm_TrgActivateTab10

The careful reader will notice that I did not use something like cm_ActivateTrgTab (as there is no such command obviously), but I used cm_TrgActivateTab10 instead. This implies that my command combination will lead to unpredictive results when I open a tenth+ tab in one of the panels.

I might be satisfied if I could open the expected never to exist 99th tab, as the "up to 99 items" in command browser (cm_commandbrowser) indicates. But if I use a cm_TrgActivateTab99 command, TC just gives me a "file not found". So I think I have to stick with the 10th tab ...

Can anybody help me out with this, or even has a better solution?

Thanks in advance!

Posted: 2017-02-11, 16:05 UTC
by MVV
I've just came up with the following command:

Code: Select all

Command: TCFS2.exe
Parameters: %Z /ef "tcd(,`%P`,ST,1) tcm(3007)"
It opens current dir in new tab of inactive panel and closes current tab; %Z tells to TC that this button should work in archives too.

Posted: 2017-02-11, 16:35 UTC
by t.rauner
MVV wrote:I've just came up with the following command:
Command: TCFS2.exe...
Hi MVV,

I just wanted to try your TCFS, but my virus scanner quarantined it, because it contains a "APC (cloud)" pattern (Avira Virus Lab).

Thank you anyway.

Posted: 2017-02-11, 18:09 UTC
by MVV
Well, it is actually impossible to get rid of all these false detects of all these paranoid anvi-virus systems. :D

But I've just checked it on VirusTotal, looks pretty good.

You have a choice of course to believe your AV or not. :)

Posted: 2017-02-11, 20:38 UTC
by petermad
How about this button:

Code: Select all

TOTALCMD#BAR#DATA
cm_GoToFirstFile,cm_OpenDirInNewTabOther,cm_CloseCurrentTab

wcmicons.dll,83
Move tab to other panel (requires at least one file in currrent dir)


-1

Posted: 2017-02-11, 21:16 UTC
by petermad
This one is better:

Code: Select all

TOTALCMD#BAR#DATA
cm_FocusTrg,cm_OpenNewTab,cm_FocusTrg,cm_MatchSrc,cm_CloseCurrentTab

wcmicons.dll,83
Move tab to other panel


-1
It doesn't require that there is a file in the source panel.
If you want focus set to the new tab, then add ",cm_FocusTrg" at the end of the command field.

Notice this solution requires TC 9.0 - since cm_FocusTrg was intruduced in this release.

problem solved at last

Posted: 2017-02-12, 02:12 UTC
by t.rauner
[quote="petermad"]This one is better:

Code: Select all

TOTALCMD#BAR#DATA
cm_FocusTrg,cm_OpenNewTab,cm_FocusTrg,cm_MatchSrc,cm_CloseCurrentTab
...
Notice this solution requires TC 9.0 - since cm_FocusTrg was intruduced in this release.[/quote]
Wow, I wasn't aware of this command, while desperately trying to find it.

Your version is working like a charm, THANK YOU, petermad :!: 

I guess, until Christian introduces a native cm_MoveTabToTrg or something similar, this will be the best surrogate.

Thank you all for your support.  :D

Edit:
I made an icon for the move tab button.
[url=http://workupload.com/file/tWmH3m5]movetab.ico 13.07 KB[/url]