asm Posted September 30, 2004 Posted September 30, 2004 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
Andre Posted September 30, 2004 Posted September 30, 2004 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!
ZeDMIN Posted September 30, 2004 Posted September 30, 2004 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
nobby Posted September 30, 2004 Posted September 30, 2004 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
asm Posted September 30, 2004 Author Posted September 30, 2004 Alright, thanks for your help, everyone.
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