baumi Posted June 22, 2006 Share Posted June 22, 2006 HiHo! I usually just have to search for 5 minutes on this great board to find all the answers I need, but my search-fu was too weak this time How do you read the output of a Command Line Windows (cmd.exe)? I have a batchfile and when it asks at the end to press a button I would like to automatically send one ... but I don't know when to send the keypress because I don't know how to read the output Many THANKS in Advance! Baumi Link to comment Share on other sites More sharing options...
seandisanti Posted June 22, 2006 Share Posted June 22, 2006 HiHo!I usually just have to search for 5 minutes on this great board to find all the answers I need, but my search-fu was too weak this time How do you read the output of a Command Line Windows (cmd.exe)? I have a batchfile and when it asks at the end to press a button I would like to automatically send one ... but I don't know when to send the keypress because I don't know how to read the output Many THANKS in Advance!Baumiin beta version, check out StdoutRead(). and there are other examples on the forums Link to comment Share on other sites More sharing options...
baumi Posted June 23, 2006 Author Share Posted June 23, 2006 Thanks! 8D But I still have a problem. The cmd.exe batch is not called with the Run command! I start a setup.exe which calls a dos-batch after it unpacked all it's files (it's one of the updatepacks from winboard.org). Is it possible to use StdOutRead without starting the cmd.exe myself? Many Thanks in Advance Baumi Link to comment Share on other sites More sharing options...
dabus Posted June 23, 2006 Share Posted June 23, 2006 You do not want to start the cmd.exe inside/from autoit? If that's the case: Then StdOutRead() won't help you. You could send the batch-stuff to a file like thisisthe.exe > test.txt. If you open the file and search through the text, you could search for the event you are waiting for. Maybe it would be easier to convert the batchfile to autoit-code. If you post it here (and it's not too complex, someone could help you out. Link to comment Share on other sites More sharing options...
baumi Posted June 23, 2006 Author Share Posted June 23, 2006 Thanks again! The problem is that the Update-Programm is a packed exe-File which contains the Batch and all the Windows-Patches, so I have no direct access to it. But I solved the Problem now ... I can manually unpack it, change the Install.bat and start it there. I will have to change the Install.bat everytime a new Update-pack is uploaded, but it's not that much work. Have FUN! Baumi Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 23, 2006 Share Posted June 23, 2006 Thanks again!The problem is that the Update-Programm is a packed exe-File which contains the Batch and all the Windows-Patches, so I have no direct access to it. But I solved the Problem now ... I can manually unpack it, change the Install.bat and start it there. I will have to change the Install.bat everytime a new Update-pack is uploaded, but it's not that much work.Have FUN!BaumiOr you could script the process of extracting the batch file and REM'ing out the last PAUSE before running it... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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