[TC Tool] TC Script Editor
Moderators: Hacker, petermad, Stefan2, white
- robinsiebler
- Senior Member
- Posts: 460
- Joined: 2003-03-05, 21:04 UTC
- franck8244
- Power Member
- Posts: 704
- Joined: 2003-03-06, 17:37 UTC
- Location: Geneva...
- franck8244
- Power Member
- Posts: 704
- Joined: 2003-03-06, 17:37 UTC
- Location: Geneva...
I'm trying to get the tree view in the left panel open at the same folder that's opened in right panel. (discussed at length here: http://www.ghisler.ch/board/viewtopic.php?t=6134)
I created the following script:
PostCmd(cm_LeftTree);
How can I make this script execute every time I launch a new instance of Total Commander?
I created the following script:
PostCmd(cm_LeftTree);
How can I make this script execute every time I launch a new instance of Total Commander?
- franck8244
- Power Member
- Posts: 704
- Joined: 2003-03-06, 17:37 UTC
- Location: Geneva...
You will have to launch TC by using a script !How can I make this script execute every time I launch a new instance of Total Commander?
for example call :
Code: Select all
"C:\Program Files\totalcmd\Utils\Macro\TCScript.exe" /run "C:\Program Files\totalcmd\Utils\Macro\a.tcs"
Code: Select all
Exec(TotalCmdExe,"/N");
sleep(250);
//Find TotalCmd's Window handles using our hosts command #0
HostCmd(0);
sleep(250);
PostCmd(cm_LeftTree);
TC#88260 -
franck8244 - thanks.
There are two issues:
1. Total Commander starts, but doesn't execute "cm_LeftTree". I also tried other variations (just to test it)- same problem. E.g.:
Exec(TotalCmdExe,"/N");
sleep(250);
HostCmd(0);
sleep(250);
PostCmd(cm_OpenDesktop);
does NOT open Desktop folder, and so on...
2. How can I pass a folder that I wish to open as a parameter to the script? Something equivalent to:
[path to totalcmd.exe]\totalcmd.exe /R="%1"
Where "%1" is the folder that was clicked to launch Total Commander
There are two issues:
1. Total Commander starts, but doesn't execute "cm_LeftTree". I also tried other variations (just to test it)- same problem. E.g.:
Exec(TotalCmdExe,"/N");
sleep(250);
HostCmd(0);
sleep(250);
PostCmd(cm_OpenDesktop);
does NOT open Desktop folder, and so on...
2. How can I pass a folder that I wish to open as a parameter to the script? Something equivalent to:
[path to totalcmd.exe]\totalcmd.exe /R="%1"
Where "%1" is the folder that was clicked to launch Total Commander
- franck8244
- Power Member
- Posts: 704
- Joined: 2003-03-06, 17:37 UTC
- Location: Geneva...
It works for meAlya wrote: Total Commander starts, but doesn't execute "cm_LeftTree". I also tried other variations (just to test it)- same problem.

You can not do that ... except if you have a way to put the foder path in the clipboard....Alya wrote:How can I pass a folder that I wish to open as a parameter to the script? Something equivalent to:
[path to totalcmd.exe]\totalcmd.exe /R="%1"
Where "%1" is the folder that was clicked to launch Total Commander
Why don't you simply close TC while in Tree view in the left ?
Then when you open it, it will be again in tree view ...
TC#88260 -
franck8244
E.g. folder F:\eBooks\Computers\ opened in right panel, tree view of C:\ opened in left panel.
I configured all folders to open by default in Total Commander through Folder Options (more detailed description here http://www.ghisler.ch/board/viewtopic.php?t=6134). The parameters are passed automatically by Windows - I 'm not sure how one can involve Clipboard here....
This is becoming complicated...
There should be a simpler way to make Total Commander execute one of its' own internal commands on start-up! This is such a basic feature...
I'm already doing that. I have tree view on the left - but it doesn't correspond to folder opened on the right.Why don't you simply close TC while in Tree view in the left ?
Then when you open it, it will be again in tree view ...
E.g. folder F:\eBooks\Computers\ opened in right panel, tree view of C:\ opened in left panel.
I configured all folders to open by default in Total Commander through Folder Options (more detailed description here http://www.ghisler.ch/board/viewtopic.php?t=6134). The parameters are passed automatically by Windows - I 'm not sure how one can involve Clipboard here....
This is becoming complicated...

- franck8244
- Power Member
- Posts: 704
- Joined: 2003-03-06, 17:37 UTC
- Location: Geneva...
2Alya
save this into a *.reg file and "launch it" ... this should solve your problem
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Ghisler\Total Commander]
"InstallDir"="%COMMANDER_PATH%"
TC#88260 -
It will be great if next version of TC Script Editor could support "UseIniInProgramDir=7franck8244 wrote:2Alyasave this into a *.reg file and "launch it" ... this should solve your problemCode: Select all
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Ghisler\Total Commander] "InstallDir"="%COMMANDER_PATH%"
" feature of TC 6.5.