Page 1 of 1

how to write a file to open a program and enter text in it

Posted: 25 Aug 2010 09:11
by austinh
I want to write a batch file that brings up a program that is already running and enter text into a particular field.

How do I bring up the program already running?

I know there are tab commands that could get me to the appropriete text field but not sure where to start?

Thanks in advance

Re: how to write a file to open a program and enter text in

Posted: 25 Aug 2010 10:15
by orange_batch
I don't think DOS/batch is capable of this by itself as far as I know, not without a command line tool, if one exists. I recommend you look into a program for creating keyboard macros/sequences. My keyboard has built-in macro keys which make these tasks easy.

Re: how to write a file to open a program and enter text in

Posted: 25 Aug 2010 11:37
by austinh
how about if I just wanted a batch file to open the program. The program will already be open by the user so how would I get it to just get brought to the front of the screen. From there I could execute a macro from the batch file to do the rest I think?

Re: how to write a file to open a program and enter text in

Posted: 25 Aug 2010 16:33
by orange_batch
You can't give a program focus using batch, unless the program itself will only allow 1 instance and loading it again gives it focus. If it's an issue, you might try a sequence involving alt+tab, or ctrl+shift+escape to open the task manager and using Switch To under Applications. Try www.autohotkey.com