Execute a DOS Batch ??
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Execute a DOS Batch ??

Started by Shurlock, 28 June, 2004, 23:28:52

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shurlock

Hi all,

Is there any way of writing a script that actually executes an MS-DOS batchfile and - after execution - returns the results so that the data can be handled by LUA?

Fact is: I have a DOS batchfile that works with a very old (but.... very NICE!!) program called SEARCHT.EXE
Using parameters, it will return the search results in NOTEPAD.
What I would like is: use this command and the results to accomodate OP's.

This tool gives me a very quick way of tracing nicknames in ALL log files, so you can imagine I would like my OP's to be able to use the DOS-instruction directly. If not, I need 48 hours in 1 day.   :(

Any suggestion is welcome!
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

plop

you can execute it with.
execute('batchfile.bat")
next open the txt file it makes.
readfrom("outputfile.txt")
after that you can remove it if you don't need it anymore.
remove("outputfile.txt")

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Shurlock

#2
Thanks Plop!

Why didn't I think of that??   :]

But will that Execute command also accept parameters given by the OP's?

For example:
command = !dobatch [nickname]

If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

Shurlock

#3
Just to proove why I would like this....

I have logger LUA's running for KICKS, BANS and LOGONS.

Once a week I archive the LOGONS with a different name in the same folder.

Any OP that wishes to know ALL about a user, should get the results of that command from ALL the <.log> files.

The LOGON also includes the IP's and the MyInfo strings.
So, this tool could be very usefull!

Greets!
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

plop

execute("batfile.bat "..nickname)

you can stuff anyhing in it as long as the bat/program you start understands it.
or you can make lua write the bat file.
my site is an example of that, i'm using lua 2 generate the php scripts for me.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk