Batch Scripting Help - Keystrokes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sm00th
    New Member
    • Jan 2008
    • 2

    #1

    Batch Scripting Help - Keystrokes

    Hi all,

    Need help again in batch scripting. I need to create a command line script to launch an .exe file, but this .exe launches a window instead of a command prompt, and in this window you have to login and click some buttons before it actually do its stuff. How can I pass keystroke parameters just by using the command line?

    Here's what it's supposed to do:
    1) Run winprogram.exe
    2) Enter password
    3) Tab
    4) Enter
    5) delay 5 seconds
    6) Hit the 'q' key
    7) delay 3 minutes
    8) Click "Run" button
    9) Hit the 'c' key
    10) delay 5 minutes
    11) Hit the 'o' key
    12) F4

    Please help. Thanks in advanced!
  • dafodil
    Contributor
    • Jul 2007
    • 389

    #2
    You can't pass keystrokes to another program using batch file unless the program allows you to do it.
    You'll have to create a program with that function or method before it can happen. Using batch scripts it will be pass like parameters. Once the program is running you cannot control it anymore with a batch file. You can only pass parameters using batch file before the program starts not while its running.

    In short controlling the program running already with a batch script is impossible.

    Comment

    • harshadd
      New Member
      • Dec 2007
      • 180

      #3
      Hey
      Batch file has its limits

      Use the VB scripts I bet It will do every thing you need in ur example...

      Comment

      Working...