1.

Solve : Batch file that enters in data to a program?

Answer»

hey guys,

i'm writing a batch file that activates a programs. Once it has done so it must pass in a condition.

The PROGRAM pops up a little window asking for "Name:". I want the batch file to pass in the name:= monty.

Can someone help me come up with code for this?

Thanks in ADVANCE,
Johnso what you want is for the program to ACTUALLY type the anem ?? Is that right ?

Almnyeah, exactly. The batch file has to pass in the name to the program.

It's like having to type in a username when you FIRST open a program.

I want the batch file to do this for me

so my batch file starts of
Code: [Select]start mike.exe

so the program starts up and asks me to pass in a name.

I want the batch file to pass in the name monty.

Does this clear it up?i assume that your program mike.exe does not take in parameters...
so i GUESS you can use VB script or something...like the Sendkeys command in vb..
or if you know how to program in scripting language like perl or python,you can download
their Expect module, and use it to control your mike.exe program.
AFAIK, batch alone cannot do this...or somebody correct me if i am wrong.



Discussion

No Comment Found