| View previous topic :: View next topic |
| Author |
Message |
Aezay Senior Member


Joined: 12 Feb 2003 Posts: 237 Location: Denmark
|
Posted: Fri Dec 05, 2003 8:52 am Post subject: [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
Last edited by Aezay on Sun May 15, 2005 6:22 pm; edited 21 times in total |
|
| Back to top |
|
 |
djk Power Member


Joined: 17 Mar 2003 Posts: 1651 Location: Poland
|
Posted: Fri Dec 05, 2003 9:14 am Post subject: |
|
|
2Aezay
Any example with big explanation, please  _________________ DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl |
|
| Back to top |
|
 |
Raymond Senior Member

Joined: 08 Feb 2003 Posts: 444
|
Posted: Fri Dec 05, 2003 9:23 am Post subject: |
|
|
| Seems the only way to run script is to press "Run Script" button. Could it be called with tcs file as command line parameter? |
|
| Back to top |
|
 |
Aezay Senior Member


Joined: 12 Feb 2003 Posts: 237 Location: Denmark
|
Posted: Fri Dec 05, 2003 9:40 am Post subject: |
|
|
| djk wrote: | Any example with big explanation, please  |
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.
| 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? |
Not yet, but it will be added. _________________ Of all the planets I've been to, this one is my favorite. |
|
| Back to top |
|
 |
JohnFredC Power Member


Joined: 14 Mar 2003 Posts: 788 Location: Sarasota & Winter Springs Florida
|
Posted: Fri Dec 05, 2003 10:59 am Post subject: |
|
|
Hi Aezay
TCScript could be a great tool!
I notice that the Text function strips backslashes and other punctuation!
I was sending:
cd c:\afolder
The TC commandline received:
cdcafolder _________________ Licensed, Mouse-Centric |
|
| Back to top |
|
 |
pdavit Power Member


Joined: 05 Feb 2003 Posts: 1462 Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
|
Posted: Fri Dec 05, 2003 12:06 pm Post subject: |
|
|
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 only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!! >Downloads< |
|
| Back to top |
|
 |
sqa_wizard Power Member


Joined: 06 Feb 2003 Posts: 2129 Location: Germany
|
Posted: Fri Dec 05, 2003 3:23 pm Post subject: |
|
|
Great tool !
The very first step is done.
Now it's up to Christian to give a little support concerning "remote control" running stable.
May be it is possible to support parameters along with certain internal commands.
Try 'n' error is quite dangerous for this. _________________ #5767 Personal license |
|
| Back to top |
|
 |
Gregory Junior Member

Joined: 08 Feb 2003 Posts: 89 Location: Kiev, Ukraine
|
Posted: Sun Dec 07, 2003 4:31 am Post subject: |
|
|
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!
| Quote: | Now it's up to Christian to give a little support concerning "remote control" running stable.
|
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 |
|
| Back to top |
|
 |
Aezay Senior Member


Joined: 12 Feb 2003 Posts: 237 Location: Denmark
|
Posted: Sun Dec 07, 2003 10:52 am Post subject: |
|
|
| 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 |
This is really the only thing missing, before a 3rd party script program can be complete.
Also, I've released beta2 which works a little better. _________________ Of all the planets I've been to, this one is my favorite. |
|
| Back to top |
|
 |
djk Power Member


Joined: 17 Mar 2003 Posts: 1651 Location: Poland
|
Posted: Sun Dec 07, 2003 6:27 pm Post subject: |
|
|
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.
| Aezay wrote: | | 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? |
Not yet, but it will be added. |
It seems to be already added.
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. _________________ DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl |
|
| Back to top |
|
 |
TucknDar Senior Member

Joined: 07 Feb 2003 Posts: 224 Location: Oslo
|
Posted: Mon Dec 08, 2003 4:38 am Post subject: |
|
|
This is a great addition to TC! Thanks a lot!
I'm looking forward to this maturing a little, so TC-tasks can be made even easier  _________________ license #76904 |
|
| Back to top |
|
 |
Aezay Senior Member


Joined: 12 Feb 2003 Posts: 237 Location: Denmark
|
Posted: Mon Dec 08, 2003 5:10 pm Post subject: |
|
|
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.
Last edited by Aezay on Sun Jun 13, 2004 10:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
djk Power Member


Joined: 17 Mar 2003 Posts: 1651 Location: Poland
|
Posted: Mon Dec 08, 2003 6:49 pm Post subject: |
|
|
Looks nice - so we are waiting  _________________ DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl |
|
| Back to top |
|
 |
Boofo Power Member


Joined: 10 Feb 2003 Posts: 1377 Location: Des Moines, IA (USA)
|
Posted: Mon Dec 08, 2003 8:46 pm Post subject: |
|
|
And maybe a few of you programming gurus could post some sample files made from this that would help up non-programmers get full use out of this great program?  |
|
| Back to top |
|
 |
VadiMGP Power Member

Joined: 05 Apr 2003 Posts: 641 Location: Israel
|
Posted: Tue Dec 09, 2003 4:14 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|