Jump to content

read cmd.exe window


Recommended Posts

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 :D

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 :D

Many THANKS in Advance!

Baumi

Link to comment
Share on other sites

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 :D

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 :D

Many THANKS in Advance!

Baumi

in beta version, check out StdoutRead(). and there are other examples on the forums
Link to comment
Share on other sites

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

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. :D

Link to comment
Share on other sites

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

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

Or you could script the process of extracting the batch file and REM'ing out the last PAUSE before running it...

:D

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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