Jump to content

Send one command to -> program.exe?


Recommended Posts

Posted

Is it possible to send a command to a program? Like every time i start "program.exe" the key "i" sends to the program when its open? (Or like 3 sec later when i clicked on the program.exe file the key "i" sends to the program")


Posted

Or you can do it also easily with VbScript

Set objShell = CreateObject("WScript.Shell")
'Start the program
objShell.run "C:\Program Files\Program\Program.exe"
Wscript.Sleep 2000
'Send i key
objShell.SendKeys "i"
Wscript.Sleep 500
'And enter
objShell.SendKeys "{ENTER}"
Wscript.Quit

Posted
Or you can do it also easily with VbScript

Set objShell = CreateObject("WScript.Shell")
'Start the program
objShell.run "C:\Program Files\Program\Program.exe"
Wscript.Sleep 2000
'Send i key
objShell.SendKeys "i"
Wscript.Sleep 500
'And enter
objShell.SendKeys "{ENTER}"
Wscript.Quit

Thanks! Excellent. Is it possible to add "drop support" to? Like if I drop a file on the vbs script and it open the file in the program?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...