Sign in to follow this  
Followers 0
baumi

read cmd.exe window

6 posts in this topic

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

Share this post


Link to post
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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0