Example for TCScript Editor

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Example for TCScript Editor

Post by *franck8244 »

Some times ago, I started a topic about TCSript Editor...

This time I give link to my script for this tool

1- (*) Increase TC width to max and restore it:
Increase & Restore

2- In both panel, go in previous dir or go in next dir: Previous & Next

3- Empty Recyle Bin: Bin

4- Create Playlist with Directory's name as name: Playlist
(:!: the inplace rename command has to be set to F2 or you'll have to change the code)

5- Change Button bar: Bar

6- Change the display of TC:Display

7- Open the synchronise folder with desire folder, method 1 (see French Post): Synchronise Usb

8- Open a specific folder in a new tab: NewTab

9- Open the Multi renamne tool with the default parameter: Default Multi Rename

10- Change view: only one shorcut to change the view in the current panel (or cycle all) :wink: Change View

11- Explorer like display (tree view on the left- thumbnail on the right) Activate & Back to normal
Note: I'm using 2 database placed in %commander_path%, cache96 & cache200

12- Open the search box with All drive by default:Search All Drive

13- Open Internet Explorer with the address in the clipboardIE Clipboard

14- Open a FTP seesion with the address in the clipboard (ctrl+N) ^N FTP

Script with (*) restart automatically TC, it can be done manually but the changes made require a restart !

I use the latest version of the library and the beta version of the exe
Last edited by franck8244 on 2005-01-16, 11:30 UTC, edited 11 times in total.
TC#88260 -
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

2franck8244 A very good idea, thanks.
But unfortunately I am asked for a password to access your files.
So I cannot access them.

I have made a Script for changing the TC language:
English and German

Maybe it's useful for someone

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2Sheepdog

1- :oops: My fault, I forgot to change all the adress in links (copy/paste from my ftp server...)
Now it works fine :!:

2- I read your tcs files. It seems you are using an old version of TCSript Editor: SendVKey changed, for the 2nd parameter value :2 key is pressed & released, 1 key is pressed, 0 key is released... :wink:
TC#88260 -
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

2- I read your tcs files. It seems you are using an old version of TCSript Editor: SendVKey changed, for the 2nd parameter value :2 key is pressed & released, 1 key is pressed, 0 key is released... Wink
I fear it's not that I use an old version but I haven't really understood how to use these commands :oops: . Thanks for advice, I have changed my scripts.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

The file for #8 does something other than open a folder in a new tab. I don't know what it does, but it mentions a playlist...
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2robinsiebler

:oops: I used the multi rename tool too fast... Now it's corrected !
TC#88260 -
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

I finally found a way to change the width of the panel (with predefine width), there is just a small thing : the cursor will be screen centered after the script execution...

Code: Select all

#include VKeys.h
PostCmd(cm_Maximize);
SetCursorPos(640,512); //Put here half of your display resolution !
MouseClick(1);
SendVKey(VK_NUMPAD3,2); // 2 stands for 20/80 ; 3 for 30/70 ....
PostCmd(cm_Restore);
TC#88260 -
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

franck8244 wrote:I finally found a way to change the width of the panel
Thanks man! it works like a charm.
I've been trying to find a way to do this for a long time.
Great tip! :lol:

One question:
Is there a way to know if focus on left or right panel now, so 80/20 or 20/80 is selected?
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2Raymond
All depend on this line :

Code: Select all

SendVKey(VK_NUMPAD3,2); // 2 stands for 20/80 ; 3 for 30/70 .... 
If you send a number < 5, you will have the big panel on the right.

If you send 7 for example, you will ask for the 70/30 division->the left panel will be the bigest
TC#88260 -
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

To franck8244
I know that.
Actually I mean if there's a way to do this: select 80/20 or 20/80 DEPEND ON where i'm in now, left panel or right panel.
I want to enlarge my CURRENT panel with one script.
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2Raymond
The only solution I have found is below, you'll have to choose which panel to increase (when the script is launch & with the keyboard ! or modify the script) :(

Code: Select all

#include VKeys.h
#define InputCaption "Choose the panel to increase"
PostCmd(cm_Maximize);
SetCursorPos(640,512);
QueryItem("","Left\0Right");
IfInt(Result,0);
{
 MouseClick(1);
 SendVKey(VK_NUMPAD8,2);
}
IfInt(Result,1);
{
 MouseClick(1);
 SendVKey(VK_NUMPAD2,2);
}
PostCmd(cm_Restore);
TC#88260 -
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

To franck8244
Thanks for your effort. :)
Looks like there's no simpler way to do it.
I make two script files according to your sample, one for 80/20 and another for 20/80. Then define two shortcuts for them.

Still hope there will come new command like cm_20percent, cm_30percent....some day.
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

Raymond wrote:Still hope there will come new command like cm_20percent, cm_30percent....some day.
With those, you will still need 2 scripts :wink:

As long as TCScript Editor can't know wich panel is the active one, there is no easy solution :(
TC#88260 -
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

franck8244 wrote:
Raymond wrote:Still hope there will come new command like cm_20percent, cm_30percent....some day.
With those, you will still need 2 scripts :wink:
If Christian decide to add these kind commands, they will come like cm_20srcpercent, cm20trgpercent...
I believe it. :P :D
heron
Junior Member
Junior Member
Posts: 8
Joined: 2004-01-24, 22:29 UTC

Post by *heron »

I did some media sorting skript:
*ot opens whatever you got in your tc just now
*you can chose which category it belongs to
*it moves it there

I _definetly_ needed something like that to sort trough some stuff on my machine...
its my first tc-skript so don't wait for something great :P

some questions remain:
-->i need to focus onto tc or some cases the last opend lister...
-->i would like to define some hotkeys in the querry...

any coments?
/start test.tcs
#include "Scripts\VKeys.h"
#define DestDir "f:\mp3\einzeln\sorted"
PostCmd(cm_List);
QueryItem("Select Group","Muell\0GoGoGo \0Hintergrund
\0Manchmal kommt die Zeit\0Down\0<weiter>");
IfInt(Result,0);
{
SendVKey(VK_ESCAPE,2);
PostCmd(cm_ClearCmdLine);
SendVKey(VK_TAB,2);
SendVKey(67,2); //'c'
StrCopy(str,"d ");
StrCat(str,DestDir);
StrCat(str, "\muell");
SetClipbrd(str);
SendVKey(VK_LCONTROL,1);
SendVKey(86,2);
SendVKey(VK_LCONTROL,2);
SendVKey(VK_RETURN,2);
SendVKey(VK_TAB,2);
PostCmd(cm_RenMov);
SendVKey(VK_RETURN,2);
}
IfInt(Result,1);
{
(...)
}
IfInt(Result,2);
{
(...)
}
IfInt(Result,3);
{
(...)
}
IfInt(Result,4);
{
(...)
}
IfInt(Result,5);
{
SendVKey(VK_ESCAPE,2);
SendVKey(VK_DOWN,2);
}
IfNotInt(Result,-1);
{
Exec("C:\data\system\tcmd\3rd\az_skript\TCScript.exe",
"/run test.tcs","C:\data\system\tcmd\3rd\az_skript\Scripts\own");
}

/end test.tcs
Post Reply