![]() ![]() If that is the case, you aren't going to be able to do that with simply a ".bat" file as the launched would stop the batch file from continuing until it terminated. Just to be clear, you are wanting to launch a program from a batch file and then have the batch file press keys (in your example, the arrow keys) within that launched program? Var WshShell = WScript.CreateObject("WScript.Shell") įor a list of key names for SendKeys, see:įor a further explanation of this solution, see: GnuWin32 openssl s_client conn to WebSphere MQ server not closing at EOF, hangs Set /P "=] Wait and send an Enter key:" NUL Set /P "=Wait and send an Up Arrow key: [" NUL ![]() Rem Start the other program in the same Window Set SendKeys=CScript //nologo //E:JScript "%~F0" Rem Use %SendKeys% to send keys to the keyboard buffer The Batch file is simple enough to be understand with no problems, so you may modify it to fit your needs. The Batch file below is an example that start another program (cmd.exe in this case), send a command to it and then send an Up Arrow key, that cause to recover the last executed command. Wow! Mean this that you must learn a different programming language just to send two keys to the keyboard? There are simpler ways for you to achieve the same thing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |