straytoasters Posted February 3, 2006 Share Posted February 3, 2006 I am needing to essentially just push the OK button from a .bat (a .vbs call is acceptable as a second option). Is there some kind of sendkey equlivent for .bat(s).Straytoasters Link to comment Share on other sites More sharing options...
Zxian Posted February 4, 2006 Share Posted February 4, 2006 You could try learning AutoIt. It can handle all the stuff that you can do in batch files, as well as press buttons for you. Link to comment Share on other sites More sharing options...
straytoasters Posted February 4, 2006 Author Share Posted February 4, 2006 Yeah. I have a friend who could make the auto it script in a minute or two. The .bat script I use so far makes about 20 or so changes and is all done with .bat commands and a .reg or two, I am trying to do all I want with as near to built in Windows componets as possible. Auto it may be my "out" but I am going to keep looking for a while. Thanks.Straytoasters Link to comment Share on other sites More sharing options...
jasirw Posted February 4, 2006 Share Posted February 4, 2006 What i do is the following. I create my bat file and also a WSF file in which i have my VB code An example is the following, i use it to install clonedvd. It is the complete script and simply sends the ALT-N combination to the program.<Job id="keystrokes"> <script language="VBScript"> Set objShell = WScript.CreateObject("WScript.Shell") objShell.run("SetupCloneDVD2.exe /S") WScript.Sleep 16000 objShell.AppActivate "CloneDVD2 Setup" WScript.Sleep 100 objShell.SendKeys "%(N)"</script></Job>I have this file named as keystrokes.wsf and call it from my bat file usingcscript keystrokes.wsfI hope this helps Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted February 4, 2006 Share Posted February 4, 2006 Yeah. I have a friend who could make the auto it script in a minute or two. The .bat script I use so far makes about 20 or so changes and is all done with .bat commands and a .reg or two, I am trying to do all I want with as near to built in Windows componets as possible. Auto it may be my "out" but I am going to keep looking for a while. Thanks.StraytoastersYou can compile the AutoIt script into an executable. This keeps you from having to install AutoIt on machines just to run the scripts. This is how I do my unattended installs where key presses are required. You can even have it disable the keyboard/mouse while it's running so that nothing interferes with the keys you send. Link to comment Share on other sites More sharing options...
straytoasters Posted February 5, 2006 Author Share Posted February 5, 2006 Yep, thats what I did for now as a workaround...but I still looking. Thanks.Straytoasters 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