agnostic Posted December 4, 2008 Share Posted December 4, 2008 Was wondering how you would go about writing something that if a window isn't displaying text at least 30 second intervals to send the keys CTRL, C, N to that specific window? Because I am running a batch script with a third party command prompt text usually gets displayed in thirty second intervals in the window if everything is going right. And sending CTRL, C, N, scripts the current command and goes to the next one which I want to do. I can understand the finding the windows and probably sending keys but don't know what I would use for making sure the window is constantly displaying text at least 15, 30 seconds. Any help is appreciated. Link to comment Share on other sites More sharing options...
BrettF Posted December 4, 2008 Share Posted December 4, 2008 This might be a nicer solution? Have a play with it ; Demonstrates StdoutRead() #include <Constants.au3> Local $foo = Run(@ComSpec & " /c dir foo.bar", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $line While 1 $line = StdoutRead($foo) If @error Then ExitLoop MsgBox(0, "STDOUT read:", $line) Wend While 1 $line = StderrRead($foo) If @error Then ExitLoop MsgBox(0, "STDERR read:", $line) Wend MsgBox(0, "Debug", "Exiting...") Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
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