Foppah Posted December 9, 2007 Share Posted December 9, 2007 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") Link to comment Share on other sites More sharing options...
cluberti Posted December 9, 2007 Share Posted December 9, 2007 Autoit was made for this type of issue. Link to comment Share on other sites More sharing options...
geezery Posted December 9, 2007 Share Posted December 9, 2007 Or you can do it also easily with VbScriptSet objShell = CreateObject("WScript.Shell")'Start the programobjShell.run "C:\Program Files\Program\Program.exe"Wscript.Sleep 2000 'Send i keyobjShell.SendKeys "i"Wscript.Sleep 500'And enterobjShell.SendKeys "{ENTER}" Wscript.Quit Link to comment Share on other sites More sharing options...
Foppah Posted December 9, 2007 Author Share Posted December 9, 2007 Or you can do it also easily with VbScriptSet objShell = CreateObject("WScript.Shell")'Start the programobjShell.run "C:\Program Files\Program\Program.exe"Wscript.Sleep 2000 'Send i keyobjShell.SendKeys "i"Wscript.Sleep 500'And enterobjShell.SendKeys "{ENTER}" Wscript.QuitThanks! 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? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now