[TC Tool] TC Script Editor

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

pdavit wrote:
Aezay wrote:...it is not as descriptive as you may wish...
It's just what I was looking for! Thank you very much!
No, thank you for making me write it, otherwise I would properly never have written it :)
Raymond wrote: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!:)
Thanks for informing me, I've uploaded a new version where this has been fixed.
robinsiebler wrote: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.
I think you define "complicated" after what you know and what you don't, when I look at VB code, I find it very complicated, but I've heard it should be much more simple than both C and Pascal.
Also, I said the language was a mix between Pascal and C, not C like.
robinsiebler wrote: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?
The "2 ints" are Integers.
I would like to see you make the definition in the language you prefer (Python) and I bet I would find it more difficult, because I don't know that language.

Please consider that my script language is far from complete, a lot of changes will properly be made.
rxyzzy wrote: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.
Please download the new version, build 116.
rxyzzy wrote: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've puzzeled a little with this too, but TotalCmd wasn't designed with a 3rd party app in mind, which is understandable. But I just don't know any way to detect whether TotalCmd is working or not.
The only workaround I can come up with, is to add a MsgBox function to pause the script, like this: MsgBox("Press Ok when Total Commander is done","Script Paused",$40);
Of all the planets I've been to, this one is my favorite.
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

I don't know what is going on with this thread, but every time I try to quote just 1 sentence, I get the entire message instead. I've never had this problem before!

Anyway back to my confusion:

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

Why are there 2 ints? Isn't the idea to assign 1 value to 1 variable? I.E. foo=1? Or am I misunderstanding? Perhaps an example is called for.
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

Rename Files is still broken in build 116. Also, Find Files and Rename File are both the same script (Rename Files).

Seems like you need a QA person. :shock:
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

2Ergo
>Syntax highighting for this tool for SynPlus plugin

Can you tell me how to use this?

Thanks!
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Poor Aezay

Pioneers have to do all the work! Hope he doesn't regret releasing TCScript too soon.

;)

It will be worth it eventually, though. A lot of us are really excited about the potential.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

robinsiebler wrote:2Ergo
>Syntax highighting for this tool for SynPlus plugin
Can you tell me how to use this?
If you have already installed SynPlus, copy the unpacked TCS.cini file to SynPlus 'Color' subfolder and run start.bat attached to SynPlus plugin and there add the TCS syntax highlighting.
Instead of runninf start bat you can simply add manually two lines to Synplus.ini

In [SYNLNG] section:
TCS=1

In [EXTENSIONS] section
*.tcs=TCS

After restarting TC it should work.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

My bad. I hadn't placed the file in the Colors dir... ::shock::
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

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

Why are there 2 ints? Isn't the idea to assign 1 value to 1 variable? I.E. foo=1? Or am I misunderstanding? Perhaps an example is called for.
You are correct, the reason why I dont use the format variable=5+2*7 is that my script engine/parser doesnt support variable assignment, but when it does, IntSet is history.
robinsiebler wrote:Rename Files is still broken in build 116. Also, Find Files and Rename File are both the same script (Rename Files).
I didn't update the "Rename Files" script, after I added 1 more parameter to the SendVKey function, just set the State parameter to 2.
The reason why both the "Find Files" and "Rename Files" are the same, is beacuse of the Open/Save bug in build 113
robinsiebler wrote:Seems like you need a QA person. :shock:
I fired him, does it show :D
JohnFredC wrote:Poor Aezay

Pioneers have to do all the work! Hope he doesn't regret releasing TCScript too soon.

;)

It will be worth it eventually, though. A lot of us are really excited about the potential.
Thanks for your support John, but don't worry I haven't regretted anything, my script languge has only improved from the feedback.
Of all the planets I've been to, this one is my favorite.
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

@Aezay

I wrote something to restart Totalcmd like this:

//Restart Totalcmd
SendCmd(cm_Exit);
Exec(TotalCmdPath);

Then a message box pops up and say:

WARNING:1 operations active in background! Terminate anyway?

With "yes" and "no" buttons, focus on "no" button. If I click "yes", Totalcmd quit without restart. What does the message mean?

Then I modify the above like this:

//Restart Totalcmd
SendCmd(cm_Exit);
SendVKey(VK_TAB,2);
SendVkey(VK_RETURN,2);
Exec(TotalCmdPath);

Most time it works well, but ocassionally it still failed to restart Totalcmd.
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

2Raymond
I included a script, that restarts TotalCmd, doesn't that one work for you?
If not, try to add Sleep(1000); just after the exit command, this should give TotalCmd time to close.
An alternative would be adding the parameter /N when executing TotalCmd, like this Exec(TotalCmdPath,"/N");
Also does the TotalCmdPath variable point to the right file in your case?
Of all the planets I've been to, this one is my favorite.
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

@Aezay
I wrote my script of restarting Totalcmd according to your example. It works well most time, but failed to restart Totalcmd sometimes, not quite often though.
User avatar
Maxwish
Senior Member
Senior Member
Posts: 370
Joined: 2003-02-05, 19:13 UTC
Location: .NL

Post by *Maxwish »

Aezay:
Could you give me some pointers on how to make a script to unpack a certain archive

Is there a way to send a filename to cm_unpackfiles ?
...BRB...
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

TC Script Editor v1.02 released, I updated the first post in this thread.
Of all the planets I've been to, this one is my favorite.
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

I don't know what happened. It worked ok but now every time I try to run it, it tells me: "Could not locate Total Commanders executeable file, please locate it in the INI file".
What should I type and where, in TCScript.ini ?
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
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:...don't worry I haven't regretted anything, my script languge has only improved from the feedback.
That's the spirit! ;)
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
Post Reply