Page 1 of 1

Execute cmdline program

Posted: March 8th, 2007, 12:47 am
by MORA
Version 0.1 released 08-03-2007

This is a plugin for smartie to execute a console program and return the output.
Made on request, probaly has a few bugs.

Usage.
1) Place dll in plugin dir.
2) Call the dll where you need it.

Exsample.
$dll(ExecCmdLine,1,cmd.exe,/C dir c:\)
$dll(ExecCmdLine,2,1,)
$dll(ExecCmdLine,2,5,)
$dll(ExecCmdLine,2,9,)

The first command wont return anything, only execute the program and store the data.
The second command will return the line (1,5,9 starts from 0)

***Note: Im not sure if smartie always reads and executes the first line before the others, if not this wont work as it

should. (Data will be from the previous run)

***Note2: REMEMBER the /C when using cmd.exe to run something, if you dont smartie will hang because the dll never

returns.

The plugin is in C# source is included.

Author
MORA (Pm at forums.lcdsmartie.org if needed)

Posted: March 9th, 2007, 6:02 am
by lazybones
Great! Should be able to have some fun with this.

Posted: March 28th, 2007, 4:57 am
by lazybones
I am trying to use this to run batch files but it always just ends up with errors.

Any suggestions? Maybe I have the syntax wrong.

Edit: Never mind, I got it work by placing quotes around my file name.