Sign in to follow this  
Followers 0
asm

DOS

5 posts in this topic

I am rather new to AutoIt and require a bit of help...

I have a script that can enter text to a DOS prompt, but is there an easy way to read text from it (Ex. without pixel by pixel analysis)?

Also, is there a way to send/read text from a window that does not possess the focus without switching the focus to it? For example, is it possible for my little script to run and utilize the prompt without the prompt having the focus?

Regards

Share this post


Link to post
Share on other sites



Hi,

As posted many times in this forum it's not possible to read text from an dos windows.

Try it with the Spy-Tool and see for yourself.

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

Hiya,

if you only want to execute one program in DOS, you can try writing the output to a file.

Run(@comspec & " /c dir c:\ > c:\dir.txt")

That should write the directory listing to c:\dir.txt.

Then you can open that file and read the output.

Greetings,

ZeD

Share this post


Link to post
Share on other sites

Although it is possible to send keys to some "unfocussed" windows, by using the ControlSend function, it is not possible to pass on text to a console or DOS prompt without that Window having the focus


CheersNobby

Share this post


Link to post
Share on other sites

Alright, thanks for your help, everyone.

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