Jump to content

Recommended Posts

Posted

I was talking a look at autoit window info and there were no classes or any visisble text showing up. Looked at a few functions none seemed what i needed. I need to read text from a dos-prompt window that is already open is it possible?

Posted (edited)

I was talking a look at autoit window info and there were no classes or any visisble text showing up. Looked at a few functions none seemed what i needed. I need to read text from a dos-prompt window that is already open is it possible?

Well, if you typed a command to get that text, you can add ">> textfile.txt" at the end and the results of the command will be saved to the text file. Then you can use AutoIt to extract the text from the text file if you are so inclined.

Edit: You can also send a mouseclick (right-click) to the DOS window (@ComSpec) and then Send ("S{ENTER}") to capture the text to the clipboard.

Edited by SerialKiller
Posted

I need to read text from a dos-prompt window that is already open is it possible?

Not at this stage unfortunately. You'll need to consider the options posted above.

The beta's StdOutRead() function is an excellent way of reading information from a program if circumstances allow you to open that program using AutoIt first. There's no longer a need for redirecting an output to a temporary file and there's also the advantage of reading output as it happens; not needing to wait until the process has finished.

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
×
×
  • Create New...