[TC Tool] TC Script Editor

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
TucknDar
Senior Member
Senior Member
Posts: 227
Joined: 2003-02-07, 09:44 UTC
Location: Oslo
Contact:

Post by *TucknDar »

Aezay wrote: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.
I think it looks very promising, and looks more like a fully fledged script than the previous one (although that worked pretty good too ;) )

Feed us a beta asap 8)
license #76904
User avatar
Pete
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-08, 18:05 UTC
Location: Bodensee (Southern Germany)

Post by *Pete »

Hello Aezay, hello VadiMGP,

what do You think about working together and implement Scripting into TConsole plugin?

Have You heard of Win32Pad? It is a very tiny, very good editor available from http://www.gena01.com/win32pad/ . Maybe its author Mr. Feldman would share his code for the scripting editor part.

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

Post by *Aezay »

03.12.13 / Released TC Script Editor v1.0 beta - build 94
Since it's my birthday, I decided to give something instead of just receiving :)
So I've released the beta of TC Script Editor, look at my 1st post in this thread for more info.


Sorry for the long reply time, I didn't have the time when I first read your posts, and then I completely forgot about them :?
VadiMGP wrote: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.
1. The problem would then be that one of the windows would be active on my FS Plugin, and the user couldn't use both windows to interact with.
2. Yes you are correct, but as long TotalCmd dont have internal scripting, I think that a 3rd party application adds more flexibilty.

Pete wrote:what do You think about working together and implement Scripting into TConsole plugin?

Have You heard of Win32Pad? It is a very tiny, very good editor available from http://www.gena01.com/win32pad/ . Maybe its author Mr. Feldman would share his code for the scripting editor part.
As I wrote in the reply to VadiMGP above, I don't think a FS plugin would give the same flexibilty.
How would you implement scripting into the TConsole plugin if you could decide?

I just tested Win32Pad, but I couldn't find anything about scripting in there :?
Of all the planets I've been to, this one is my favorite.
TucknDar
Senior Member
Senior Member
Posts: 227
Joined: 2003-02-07, 09:44 UTC
Location: Oslo
Contact:

Post by *TucknDar »

This new script-tool looks great, Aezay! Will be very useful! Thanks, and Tillykke med fødselsdagen ;)
license #76904
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

TucknDar wrote:This new script-tool looks great, Aezay! Will be very useful! Thanks, and Tillykke med fødselsdagen ;)
Mange tak :)
Of all the planets I've been to, this one is my favorite.
User avatar
totfun
Junior Member
Junior Member
Posts: 67
Joined: 2003-03-11, 07:13 UTC

Post by *totfun »

Hello Aezay!
I'm just starting to enjoy your TC script editor. It seems great!
Thank you!
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Aezay wrote:03.12.13 / Released TC Script Editor v1.0 beta - build 94
Thanks, it seems to be nice.... I will try it during weekend...
Aezay wrote:Since it's my birthday
Let all your dreams come true and... let all your TC tools become better and better... :-)
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
Pete
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-08, 18:05 UTC
Location: Bodensee (Southern Germany)

Post by *Pete »

Hello Aezy,

first of all: Happy Birthday to You.

Concerning TConsole I could imagine that it runs with own command interpreter, for example executing scripts generated with Your script editor. Maybe also executing internal cm_**** commands directly. Other unknown commands will be passed to cmd.exe and evaluated there. In this case, scripting is only available when TConsole is open (actual tab).

Well, it could look like this: I use Your editor for writing and to running scripts, as well as I can use TConsole to run scripts and any other text editor to write scripts.

By telling You about Win32Pad I was thinking about editor functionalities, not about scripting capabilities. Win32Pad is not capable of scripting. But, instead of inventing the wheel once again (by writing another editor), my suggestion was to get in touch with Mr. Feldman the author of Win32Pad and ask him to share his code on Your editor.

Best regards and greets to VadiMGP
Pete
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

djk> Let all your dreams come true and... let all your TC tools become better and better...
Pete> first of all: Happy Birthday to You.
Thanks :D

Pete> Concerning TConsole I could imagine that it runs with own command interpreter, for example executing scripts generated with Your script editor. Maybe also executing internal cm_**** commands directly. Other unknown commands will be passed to cmd.exe and evaluated there. In this case, scripting is only available when TConsole is open (actual tab).
I can't really say that much about this subject, because I don't know TConsole well enough.

Pete> Well, it could look like this: I use Your editor for writing and to running scripts, as well as I can use TConsole to run scripts and any other text editor to write scripts.
First of all, we should hear VadiMGP's opinion about this.

Pete> By telling You about Win32Pad I was thinking about editor functionalities, not about scripting capabilities. Win32Pad is not capable of scripting. But, instead of inventing the wheel once again (by writing another editor), my suggestion was to get in touch with Mr. Feldman the author of Win32Pad and ask him to share his code on Your editor.
Don't worry, a text editor is pretty simple to make. Almost every programmer has made one, it's like step 2 where step 1 is a calculator.
Of course, you can still load .TCS script files into your favourite text editor and modify them there, but you wont have the internal command list and properly not the syntax highlighting.
Of all the planets I've been to, this one is my favorite.
User avatar
Pete
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-08, 18:05 UTC
Location: Bodensee (Southern Germany)

Post by *Pete »

Aezay,

I am not a programmer, so I do not know, how easy/how hard it is to write a text editor. But I was thinking about future versions of Your editor: adding icons, adding word wrap, adding tabulators, adding search function, etc.

And I also do not know how easy/how hard it would be to implement Your scripting capabilities into TConsole.

But I think alot of users would appreciate that.

Let us wait for VadiMGP's opinion about this.

Best regards
Pete
PS: Sorry for misspelling Your name in my last post.
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

I think concentrating on the script language and executable would be time well spent. Many editors have means to add key words for selecting... TextPad, for instance.

No need to reinvent the wheel.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

2Aezay
djk wrote:Let all your dreams come true and... let all your TC tools become better and better...
There nothing to add... May be... Not TC tools only! :) I must to say: your HWND Monitor is perfect tool! Happy Birthday!

Now, questions/suggestions about script engine.
1. Your script language is already very rich. Can you provide some language description?
2. What do you think about adding to TCscript.exe some parameters like %p, %n etc? I mean ability to get selected files from TC when script is starting.

About TConsole. Basic idea of TConsole is very simple - create console, run instance of cmd.exe connected to this console (or any other command interpreter) and displays console output. If "Close on Hide" option is unchecked, cmd continue to run even TConsole window invisible.

Theoretically it is absolutely no problem to build interface and establish connection between TConsole and running script engine, but question is "What we can do with it in reality?". Right now, i dont see how script engine can use TConsole (lack of imagination, perhaps :)). Pete, can you give some examples what kind of problems you want to solve in this way?
But from other hand TConsole (and many other plugins i hope) can use scripts! For example, i want to add option to TConsole to enlarge filelist window when TConsole is visible and restore previous width when it hidden. The same wish can be actual for calendar plugin. Aezay, is it possible? May be it is worth to develop script engine as dll-version, so any plugin-writer can call exported function to run script from file or from memory?
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

2Pete & 2JohnFredC
I don't have any plans on improving the editor further, as JohnFredC suggest I would rather like to improve the script language.

VadiMGP wrote:There nothing to add... May be... Not TC tools only! :) I must to say: your HWND Monitor is perfect tool! Happy Birthday!
Thanks :D
I've actually made some improvement to hWnd Monitor, the one on my site is quite old. Maybe I should get it ready and release it.
VadiMGP wrote:Now, questions/suggestions about script engine.
1. Your script language is already very rich. Can you provide some language description?
2. What do you think about adding to TCscript.exe some parameters like %p, %n etc? I mean ability to get selected files from TC when script is starting.
1. Regarding the language itself, I would like it to be some kind of hybrid between C and Pascal. Normally I program in Delphi (ObjectPascal) but somethings are easier to do in C, so those things are taken from there. I'm currently thinking of a way to implement parameter help, for each function as a popup hintbox.
2. Good idea, the program will then translate them into string variables that can be used in the script, in a style like this: ParamStr1, ParamStr2 etc.
VadiMGP wrote:But from other hand TConsole (and many other plugins i hope) can use scripts! For example, i want to add option to TConsole to enlarge filelist window when TConsole is visible and restore previous width when it hidden. The same wish can be actual for calendar plugin. Aezay, is it possible? May be it is worth to develop script engine as dll-version, so any plugin-writer can call exported function to run script from file or from memory?
The script engine is already a stand alone dll version (sc_TotalCmd.dll). It shouldn't be a problem for others to load and use it, I just have to release my header files for the script library format. They are written in Pascal, so they'd properly have to be translated since most program in C++. The thing is, that I may not have made the last change, to the general header of the scripting library, so if I decide to release the source now, it'll be a mess later.
Of all the planets I've been to, this one is my favorite.
Gregory
Junior Member
Junior Member
Posts: 89
Joined: 2003-02-08, 10:04 UTC
Location: Kiev, Ukraine

Post by *Gregory »

2Aezay
I wonder if TC command <Go to file> (in Search) can be passed to TC by external program if it is so you can include it in TC Script
User avatar
Pete
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-08, 18:05 UTC
Location: Bodensee (Southern Germany)

Post by *Pete »

Hello Aezay and VadiMGP,

I was reading this TC forum for a long time now, and from time to time ppl have requested to enter and execute cm_* commands directly at the command line within TC.
Also many ppl have requested scripting capabilities within TC.

For me, TCScript editor/interpreter is an external program which fullfills the task of scripting very good, but it pops up in a new window, while TConsole is directly integrated into TC via plugin interface.

If I have written several scripts already and I want to execute them, everytime I have to load them into TCScriptEditor first.

If it is integrated in TConsole I just would type e.g. "execute myscript.tcs" and the script will be executed.
(Ok, there will be a option in TConsole for the path to the directory containing the scripts, as well as an option to the path of TOTALCMD.INC.)

Running cm_* commands I would type "execute cm_command" or the internal command will be recognized even only by typing "cm_command".

So, in TConsole are 2 tasks to fulfill:
- integrate sc_TotalCmd.dll
- add to interpreter to execute cm_* commands directly.

And in TCScript:
- do a research of what ppl would like to add to be scrpited (like timers, variables, commands, ...)
- then concentrate on developing script engine.

Examples for solving problems this way:
To make both tools even more powerful and more userfriendly by combining them, if possible depending on the commands available for scripting and their outputs.

Best regards
Pete
Post Reply