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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
austinh
Posts: 2
Joined: 25 Aug 2010 09:08

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

#1 Post by austinh » 25 Aug 2010 09:11

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

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

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

#2 Post by orange_batch » 25 Aug 2010 10:15

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.

austinh
Posts: 2
Joined: 25 Aug 2010 09:08

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

#3 Post by austinh » 25 Aug 2010 11:37

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?

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

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

#4 Post by orange_batch » 25 Aug 2010 16:33

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

Post Reply