[TC Tool] TC Script Editor
Moderators: Hacker, petermad, Stefan2, white
[TC Tool] TC Script Editor
About this Program:
It all started with a program named TC Batch Script (which is dead now) which the lack of scripting in Total Commander made me create.
With this utility, you can execute multiple internal commands and use the scripts functions in other ways to interact with Total Commander.
Warning:
- Since this program uses Total Commander in a way it wasn't meant to be used, it could crash it!
- If you enter the right (or wrong) commands and run the script, you could delete files without seeing a confirmation dialog.
- Only use this tool if you swear not to blame me if something goes wrong (sounds comforting, right ).
How To Use It:
First, copy the newest TOTALCMD.INC file into the same directory as the this executeable.
The script language is rather easy to learn, if you know another language, but it's currently limited in many ways. If you don't have any experience in scripting, then maybe this program isn't for you.
I wont go into details and descripe how each function in this script language works, instead open some of the included examples and study them carefully. A complete list of the functions can be found in the dialog that pops up when pressing F6.
There is 1 function I would like to explain though, and this is PostCmd which will send an internal command to TotalCmd such as cm_MkDir. By pressing F5, all internal commands will be listed in a dialog, where you also can filter them out.
I've also taken the liberty to include some scripts which has nothing to do with TotalCmd, just to show what other things this script engine can do.
Known Issues (Should be fixed, but please confirm):
The SendText command does not work with special characters, only lowercase letters a to b and numbers 0 to 9. This shouldn't be to difficult to fix, I just need to put it through an ASCII -> Virtual Key converter. If I'm not mistaken, theres an API funtion for this, but i cant remember the name of it.
Command Line Parameteres:
TCScript.exe %filename% Loads the file into the script editor.
TCScript.exe /run %filename% Will run the script file and then quit.
05.05.16 / Released TC Script Editor v1.04 final - build 245:
> Direct Link (RAR) (237 k)
> Newest Script Library (Not available - Included in the direct link above)
> Screenshot (10.2 k)
> What's New (1984 b)
> Readme (1157 b)
> My TotalCmd Tools Dir
> List of All My Programs
It all started with a program named TC Batch Script (which is dead now) which the lack of scripting in Total Commander made me create.
With this utility, you can execute multiple internal commands and use the scripts functions in other ways to interact with Total Commander.
Warning:
- Since this program uses Total Commander in a way it wasn't meant to be used, it could crash it!
- If you enter the right (or wrong) commands and run the script, you could delete files without seeing a confirmation dialog.
- Only use this tool if you swear not to blame me if something goes wrong (sounds comforting, right ).
How To Use It:
First, copy the newest TOTALCMD.INC file into the same directory as the this executeable.
The script language is rather easy to learn, if you know another language, but it's currently limited in many ways. If you don't have any experience in scripting, then maybe this program isn't for you.
I wont go into details and descripe how each function in this script language works, instead open some of the included examples and study them carefully. A complete list of the functions can be found in the dialog that pops up when pressing F6.
There is 1 function I would like to explain though, and this is PostCmd which will send an internal command to TotalCmd such as cm_MkDir. By pressing F5, all internal commands will be listed in a dialog, where you also can filter them out.
I've also taken the liberty to include some scripts which has nothing to do with TotalCmd, just to show what other things this script engine can do.
Known Issues (Should be fixed, but please confirm):
The SendText command does not work with special characters, only lowercase letters a to b and numbers 0 to 9. This shouldn't be to difficult to fix, I just need to put it through an ASCII -> Virtual Key converter. If I'm not mistaken, theres an API funtion for this, but i cant remember the name of it.
Command Line Parameteres:
TCScript.exe %filename% Loads the file into the script editor.
TCScript.exe /run %filename% Will run the script file and then quit.
05.05.16 / Released TC Script Editor v1.04 final - build 245:
> Direct Link (RAR) (237 k)
> Newest Script Library (Not available - Included in the direct link above)
> Screenshot (10.2 k)
> What's New (1984 b)
> Readme (1157 b)
> My TotalCmd Tools Dir
> List of All My Programs
Last edited by Aezay on 2005-05-16, 00:22 UTC, edited 21 times in total.
I know, the explanation is very limited. I included 2 or 3 examples, but they dont really show that much. I'll include some more in the next version.djk wrote:Any example with big explanation, please
Not yet, but it will be added.Raymond wrote:Seems the only way to run script is to press "Run Script" button. Could it be called with tcs file as command line parameter?
Of all the planets I've been to, this one is my favorite.
- pdavit
- Power Member
- Posts: 1529
- Joined: 2003-02-05, 21:41 UTC
- Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
- Contact:
I love you Aezay!!!!
My biggest wish for TC ( http://www.ghisler.ch/board/viewtopic.php?t=119 ) is finally taking form even with an add-on application!!!
Now we are able to automate a series of file managing actions performed by the very best file manager ever created!!!
Wow, these are happy days!!! Keep up the good work!
Regards,
Panos
My biggest wish for TC ( http://www.ghisler.ch/board/viewtopic.php?t=119 ) is finally taking form even with an add-on application!!!
Now we are able to automate a series of file managing actions performed by the very best file manager ever created!!!
Wow, these are happy days!!! Keep up the good work!
Regards,
Panos
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Christian Ghisler Rules!!!
- sqa_wizard
- Power Member
- Posts: 3881
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
2Aezay
I'm using Windows PowerPro for writing scripts for TC (it can invoke internal commands of TC), but your program is very interesting too (and eazier a lot). Good work!
I'm using Windows PowerPro for writing scripts for TC (it can invoke internal commands of TC), but your program is very interesting too (and eazier a lot). Good work!
And find the way to pass information about TC (active panel, sorting order, files in active and target panels, state of branch view etc.) to external programs like TC Batch ScriptNow it's up to Christian to give a little support concerning "remote control" running stable.
This is really the only thing missing, before a 3rd party script program can be complete.Gregory wrote:And find the way to pass information about TC (active panel, sorting order, files in active and target panels, state of branch view etc.) to external programs like TC Batch Script
Also, I've released beta2 which works a little better.
Of all the planets I've been to, this one is my favorite.
2Aezay
Well, now I see how it works. Great tool!
My first batches which I prepared were to easily change TC language - I couldn't find such an option in TC.
2 whishes:
- I couldn't find an option to insert a command between existing ones, it's always added at the end of them. Could it be possible to add such option? Or possiblity to move the commands up/down?
- There is an option "Save" but it always ask for a name of the script (even I loaded one). Could you add "Save as" for such behaviour and "Save" change for saving current batch.
Well, now I see how it works. Great tool!
My first batches which I prepared were to easily change TC language - I couldn't find such an option in TC.
It seems to be already added.Aezay wrote:Not yet, but it will be added.Raymond wrote:Seems the only way to run script is to press "Run Script" button. Could it be called with tcs file as command line parameter?
2 whishes:
- I couldn't find an option to insert a command between existing ones, it's always added at the end of them. Could it be possible to add such option? Or possiblity to move the commands up/down?
- There is an option "Save" but it always ask for a name of the script (even I loaded one). Could you add "Save as" for such behaviour and "Save" change for saving current batch.
I've scrapped the project
Don't worry, I started another project entirely from scratch, here's a little preview on how it looks at the moment.
It may look more complicated, but it's much easier to edit and more similar to a real script language. It uses a modified script library I've created for my application Nifty Worker v2.0, which is currently in the beta stages.
Don't worry, I started another project entirely from scratch, here's a little preview on how it looks at the moment.
It may look more complicated, but it's much easier to edit and more similar to a real script language. It uses a modified script library I've created for my application Nifty Worker v2.0, which is currently in the beta stages.
Last edited by Aezay on 2004-06-14, 04:55 UTC, edited 1 time in total.
2Aezay Congratulation! Great tool.
Long time i intended to write scripting tool, but you are first.
What do yoou think about implementing this tool as FS-plugin? Avantages are:
1. If several TC instances are running you don't need to find the correct one.
2. If you run script in the same thread as TC it is more safely, from user input point of view, because user input is blocked.
Long time i intended to write scripting tool, but you are first.
What do yoou think about implementing this tool as FS-plugin? Avantages are:
1. If several TC instances are running you don't need to find the correct one.
2. If you run script in the same thread as TC it is more safely, from user input point of view, because user input is blocked.