walle Posted September 1, 2007 Share Posted September 1, 2007 I can see the window for a milisecond, it contains the information I need but it flashes so fast that the StdoutRead($get) doesn't mange too read the window. Do I need to save it into a .txt and then use something like "StringLeft(StringStripWS ($StdOut, 8),17))" #include <constants.au3> $get = Run(@ScriptDir & "\" & "miso.exe -tools.iso -cd","",$STDOUT_CHILD) While ProcessExists($get) ;Wait for program to finish Sleep(100) WEnd $StdOut = StdoutRead($get) MsgBox(4000, "Results", $StdOut) Link to comment Share on other sites More sharing options...
Zedna Posted September 1, 2007 Share Posted September 1, 2007 Look at this (from helpfile at StdoutRead): ; Demonstrates StdoutRead() #include <Constants.au3> $foo = Run(@ComSpec & " /c dir foo.bar", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) 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...") Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
chenxu Posted September 1, 2007 Share Posted September 1, 2007 try this: $StdOut = "" $get = Run(@ScriptDir & "\" & "miso.exe -tools.iso -cd","",$STDOUT_CHILD) While ProcessExists($get) $StdOut = $StdOut & StdoutRead($get) Sleep(10) WEnd MsgBox(4000, "Results", $StdOut) Link to comment Share on other sites More sharing options...
walle Posted September 1, 2007 Author Share Posted September 1, 2007 (edited) Added @SW_MAXIMIZE, worked Edited September 1, 2007 by walle Link to comment Share on other sites More sharing options...
walle Posted September 1, 2007 Author Share Posted September 1, 2007 This line works Run(@ScriptDir & "\" & "miso.exe -tools.iso -cd ","",$STDOUT_CHILD, @SW_MAXIMIZE)oÝ÷ ض¬¢w¢É÷öÖ®¶sbb33c´ÖvSÒb33²×FööÇ2æ6òb33°¥'Vâ67&DF"fײb33²b3#²b33²fײb33¶Ö6òæWRb33²fײb33c´ÖvRfײb33²Ö6Bb33²ÂgV÷C²gV÷C²Âb33cµ5DDõUEô4ÄBÂ5uôÔÔ¤R I can't see the difference? Link to comment Share on other sites More sharing options...
Zedna Posted September 1, 2007 Share Posted September 1, 2007 (edited) missing spaces: $Image= ' -tools.iso ' Edited September 1, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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