[TC Tool] TC Script Editor

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

Raymond wrote:@Aezay

This function:
SendVKey(VKey: int; State: int);
From the examples I know the second parameter can be 0, 1, 2. What do they stand for?
I guess 1 - press key; 0 - release key; 2 - press&release key. :wink:
User avatar
foscmgt
Junior Member
Junior Member
Posts: 25
Joined: 2003-02-20, 11:25 UTC
Location: Sabadell

Post by *foscmgt »

Hi Aezay,
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.
I'm working in Win98se. Into a DOS window I try this but not work :
C>Tcscript.exe %MakeDir.tcs%
and
C>Tcscript.exe /run %MakeDir.tcs%
Only appears the TCScriptEditor screen (without load the script)
what's wrong ?
The files Tcscript.exe and Make Dir.tcs are in the same folder.:(
Thanks
Manel
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

2foscmgt You dont need to type percent signs. Just "Tcscript.exe MakeDir.tcs".
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

VadiMGP wrote:Wow! Very powerful language! But what do you think about extending it's power by some special commands for dialog box handling? ;) So it will be possible to write less harmful scripts like following
I could add the command FindWindow (you properly know that one). I'll also see what I can think of, for a PushButton function.
VadiMGP wrote:I guess 1 - press key; 0 - release key; 2 - press&release key. :wink:
VadiMGP wrote:You dont need to type percent signs. Just "Tcscript.exe MakeDir.tcs".
Thanks VadiMGP for answering questions while I slept :D
Last edited by Aezay on 2003-12-16, 09:23 UTC, edited 3 times in total.
Of all the planets I've been to, this one is my favorite.
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Excellent work Aezay! The TC Script Editor is becoming a real gem!

Keep up the good work.

Kind regards,
Panos
Last edited by pdavit on 2003-12-16, 09:21 UTC, edited 4 times in total.
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Thanks VadiMGP and Aezay! :)
User avatar
foscmgt
Junior Member
Junior Member
Posts: 25
Joined: 2003-02-20, 11:25 UTC
Location: Sabadell

Post by *foscmgt »

VadiMGP wrote:
2foscmgt You dont need to type percent signs. Just "Tcscript.exe MakeDir.tcs".
Thanks. I'm working also in AutoIt v2 !! :oops:
Manel
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Can we, please, Aezay have a description of what each script command does along with a sort example for each case? The txt file with the syntax was useful but for first time users like me it's quite difficult and risky to test file managing commands.

Thanks in advance.

Regards,
Panos

PS: I would appreciate also an example for copying a file or a group of files to multiple destinations! Yes! With TCScriptEditor this is now possible!!! ;)
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

I made a script file myself and put it in the same folder as TCScript.exe. Then I add Start Menu item and fill the Command blank with

D:\Totalcmd\tool\TC Script\TCScript.exe /run "FindMusic.tcs"

Sometimes it works well, but sometimes only ScriptEdit main window pops up with no file loaded.
I tried this too:

D:\Totalcmd\tool\TC Script\TCScript.exe /run FindMusic.tcs

The same problem happens sometimes.
Did I do anything wrong?

Edit: I got it, I should add full path before the .tcs file.
Last edited by Raymond on 2003-12-16, 11:30 UTC, edited 1 time in total.
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

2pdavit
Okay, AzScript.txt, it is not as descriptive as you may wish, but its a start.
* If the link gives you a 404, I've properly released a new version of the program, where a newer AzScript.txt is included.
Raymond wrote:Sometimes it works well, but sometimes only ScriptEdit main window pops up with no file loaded.
Try setting the command to D:\Totalcmd\tool\TC Script\TCScript.exe and the paramters to /run FindMusic.tcs

I just changed some things in how a script is run from the command line, maybe this fixes it. But you'll have to wait until the next version.
Last edited by Aezay on 2004-06-14, 05:13 UTC, edited 1 time in total.
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Aezay wrote:...it is not as descriptive as you may wish...
It's just what I was looking for! Thank you very much!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

When run TCScript.exe with no file loaded, try write something and save it with "Save" or "Save as", nothing is saved.
Only when loading an existed file and modifying something, then "Save" will works.
"Save as" doesn't work at all.

Edit: Seems "Save" doesn't work now. I have to edit .tcs file in another text editor.
Anyhow, I've made 5 script files till now. They work just fine. This tool is great!:)
Last edited by Raymond on 2003-12-16, 21:38 UTC, edited 2 times in total.
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

Not to sound critical, but by making your scripting language C like, don't you feel that you are making it needlessly complicated? C has many great features, but ease of use isn't one of them. The more complicated your language is, the fewer the number of people who are going to use it. If you made your language simpler, there would be a lot more people who could benefit from it.

For instance:

>IntSet(var I: int; Value: int);
>Sets the value of the integer variable

It's been a long time since I have had an anything to do with C (Python is so much faster/easier/better), that I don't even know what the above means! What are the 2 ints? Why not make your definitions easier to understand?
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

Aezay wrote:I could add the command FindWindow (you properly know that one). I'll also see what I can think of, for a PushButton function.
I didn't mean just finding a window. I especially wrote IfDialogPresent as statement instead of function because i thought about some kind of "window scope" or "window context", so PushButton function related to this window. Yes, it's possible to define PushButton with additional parameter (i.e. HWND) but in this case the language will be much more complicated for non-programmers.
I think in specific window context implementation of dialog-related functions shouldn't be very difficult. ;) For PushButton all we need is to find button with specified caption and send WM_COMMAND.
Implementation of SetText function should find static with specified caption and send WM_COMMAND to the next window in taborder. etc...

And you know... May be it sounds a little bit crazy, but if your language will allow to call function from other dlls i can implement dialog-related functions myself! :lol:
rxyzzy
Junior Member
Junior Member
Posts: 15
Joined: 2003-12-04, 20:45 UTC

Post by *rxyzzy »

2 aezey

I have downloaded you last version of 1.0 final b113 and what doesn't work for me is that it doesn't save the script file neither with Save or Save As. Is this just my problem? I am running WinXP Pro.

I have tried my hand at writing a script that did something useful for me. Problem I had was that I have opened the TC menu for extracting archive files and then manipulated it by sending texts and keystrokes from your program - but when I send in the final VK_RETURN to execute the TC command there doesn't seem to be any way to reliably wait for TC to finish doing it before going on with the script. I have used Sleep(), but this is inconvenient because TC can take very short or very long time doing the unpack. I have tried to add SendCmd(cm_50percent); in hope that it will wait for TC to come back and execute it as some kind of a No-Operation command, but this didn't happen. TCS would come back abd beep being ready sooner than TC took to unpack the files. Hence the commands following the unpack haven't been executed. In my opinion there should be a command to waqit for TC to be ready to accept new commands. Otherwise in complex situtations where the timing is unpredictable one could have really disastrous results with some script commands being skipped and other executed.
Post Reply