lst2xxx: advice needed

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

lst2xxx: advice needed

Post by *JackFoo »

Hi,
I've at last decided to write a tool to do the following:
* it basically does what Christian's batch creator does, only it will run the commands without creating a batch file; (one press of a button); I'm going to extract .ape files using it since creating a batch first is kind of annoying and time consuming...

Code: Select all

lst2xxx.exe -e "encoder.exe" -s "-fd12 -e %p\%f\%e -o c:\temp\%f.new" -l listfile.lst
listfile.lst:
d:\files\f1.ape
d:\files\f2.ape

would result in:
encoder.exe -fd12 -e d:\files\f1.ape -o c:\temp\f1.new
encoder.exe -fd12 -e d:\files\f2.ape -o c:\temp\f2.new

to be run sequentially i.e. the second call is done only after the first one has finished;

What do you think:
1. I need 3 or 4 suitable letters to replace xxx in the name since mult or multi is taken...
2. How do you prefer my program to be, a windows (hidden proccess) or command line interface.
3. How would you like the started commands to appear, in the same command line interface or a new interface (popping for each line)
4. Any other placeholders to suplement the %p,%f,%e; maybe a counter %c?
5. I was also thinking of adding a prameter -w [ms] wich tells how long to wait before executing each proccess: 0->till it finishes, [N]->N milliseconds
6. Any other suggestions.

Cheers.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hi JackFoo

That's an excellent idea! I suggest the following:
1. lst2run or lst2exe
2. how about a dialogbox-style program with a progress field (showing the currently executed program) and a cancel button? The alternative would be a temporary batch file which deletes itself at the end with del filename.bat. Make sure NOT to have a <cr><lf> at the end in this case, to avoid an error.
3. it depends on what the program should do. For processing of DOS commands, I suggest the solution with the temporary batch file. For Windows programs, the question is unnecessary.
4. Please try to support the exact same placeholders as in the makebat plugin!
5. Excellent idea!
6. Maybe give the user the option between a temporary batch file and your program starting the processes.
Author of Total Commander
https://www.ghisler.com
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

Hi Christian, thanks for the feedback;
1. ok so the current contenders are lst2mrun lst2run lst2exe, I'll choose one (maybe I'll throw a dice)
2. Well, this could be nice, unfortunately I'm writing it using pure C, no MFC's or other Microsoft libraries, so I doubt I could do a dialog from scratch. So unless I find an easy way of doing it I'll probably make a command line window pop.
3. true, I think I'll just run them and let windows decide.
4. ok, I'll try.
5. about [3], if [w] is a number of ms. I'll pop another window
6. sure, I can do that, maybe something in the line of:
-b (default): just run
-b "file.bat": run + create file
-b 1 "file.bat": create file only

Cheers.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

To 2.:
I'm never using any MFC either! It's not that difficult to create a dialog: Create a resource file (.rc) with the dialog resource, and use CreateDialog or so to display it. Please contact me by e-mail if you need any sample code.

To 6.:
Good idea! Maybe you should also distinguish between create bat+run and create bat+run+delete.
Author of Total Commander
https://www.ghisler.com
Post Reply