|
Title | CloseAllTabs |
File Name | CloseAllTabs.txt |
Description | Close all tabs (even locked) in the current panel |
Author | Vochomurka |
Parameters | - |
Plugins Called | win, tc, childwin, ini |
Icon | |
Version | 2.0 |
Updated on | 08.06.2009 |
local hwnd = win.handle("c=TTOTAL_CMD") win.sendmessage(hwnd, 0x400+51, 3008, 0) ;Sub_TMTC - name of script TMTC if(not runfile.Subs\Sub_TMTC(hwnd)) quit ;OpenTabs - name of script OpenTabs runfile.OpenTabs("No.tab", 0) win.sendmessage(hwnd, 0x400+51, 3008, 0) if(not runfile.Subs\Sub_TMTC(hwnd)) quit
Attention! This script does not work in Total Commander 7.5 pb1 and pb2!
This script for Total Commander 7.0 and older.
How to close all tabs and get the "tabless" panel, as in Total Commander older than version 6.0?
It seems that there are two ways. First way is the cm_CloseAllTabs command. But it can't close locked tabs. I consider this feature as a bad one. It would be better to include the following choices in the configuration:
Reaction to "Close All Tabs" command: Close all Close unlocked only Prompt for each locked |
The second way to close all tabs is better than the first one. I have created the following No.tab file:
[activetabs]
0_path=
0_options=
activetab=0
So as to close all tabs the opentabs No.tab command should be executed. This way has at least two disadvantages. First: the opentabs command can't be assigned to a button on bar called with both TCmenu and TCToolbar programs. By the same reason it can't be executed externally by PowerPro. It can be assigned to a hotkey, neither... Well, I understand the cause: unlike other commands, this one requires a parameter...
Second disadvantage is the following. Even if the checkbox "Show tab header also when there is only one tab" is unchecked, the panel looks woefully, and after executing the cm_RereadSource command it contradicts the settings.
The present script is disposed of all the said drawbacks.
All Scripts | Total Commander | TotalCmd.net | PowerPro |