Bert Posted January 14, 2007 Share Posted January 14, 2007 I'm working on a script, and I need to read the output pane in SciTe when AutoIt3Wrapper is started. I tried this, and got nowhere. if ProcessExists("AutoIt3Wrapper.exe") then $list = ProcessList("AutoIt3Wrapper.exe") for $i = 1 to $list[0][0] $conr = StdoutRead($list[$i][1]) next sleep(300) $str1 = StringInStr($conr, "Exit code:") sleep(500) MsgBox(0, $str1, $conr) EndIf I need to know when the "Exit code:" is produced in output. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
phantom Posted January 14, 2007 Share Posted January 14, 2007 i am a little new to this but is this what u mean ? ConsoleRead (11) Link to comment Share on other sites More sharing options...
Developers Jos Posted January 14, 2007 Developers Share Posted January 14, 2007 I'm working on a script, and I need to read the output pane in SciTe when AutoIt3Wrapper is started. I tried this, and got nowhere.I need to know when the "Exit code:" is produced in output. Volly, could explain what you exactly want?Are you asking to:Run a seperate compiled script that reads the SciTE output pane and checks for "Exit code".Maybe you can explain the purpose for this? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Uten Posted January 14, 2007 Share Posted January 14, 2007 I got the impression @Volly wants something similar to tee on unix. The ability to monitor/redirect the IOstream in several places. I think there are 3(4) solutions. 1: A wrapper application between scite and au3wrapper. It would just monitor the iostream and react to it or pass the info on to scite. 2: Attache to the iostream through some dllcalls. Some thing similar to @Valiks stub.exe code (C++) 3: Poll the content of the output pan constantly and monitor for the information wanted. (CTRL+C and clipget works in the worst case scenario) 4: ? Could it be done through a LUA script in SciTE Witch solution to chose is a matter of how important the functionality is. Oh, well thats mu 0.02$ anyway. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Bert Posted January 14, 2007 Author Share Posted January 14, 2007 Danny34 and I are working on a new version of the SciTe toolbar. It is working well, but I discovered a problem. We have it coded so when you press the go icon, or the beta go icon, the toolbar will change so it reflects what controls is available in SciTe. The bug I found is when a error shows up in the AU3Check. If a error shows up, and you press stop, I need the toolbar to switch back. (Just like the controls do in SciTe) I was hoping to read the output in the console to get what I needed. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Developers Jos Posted January 14, 2007 Developers Share Posted January 14, 2007 (edited) Danny34 and I are working on a new version of the SciTe toolbar. It is working well, but I discovered a problem. We have it coded so when you press the go icon, or the beta go icon, the toolbar will change so it reflects what controls is available in SciTe. The bug I found is when a error shows up in the AU3Check. If a error shows up, and you press stop, I need the toolbar to switch back. (Just like the controls do in SciTe) I was hoping to read the output in the console to get what I needed.Does somethng like this work for you ? Opt("WinTitleMatchMode",4) While 1 $outputPane = StringRight(ControlGetText("classname=SciTEWindow", "", "Scintilla2"),30) TrayTip("", $outputPane ,5) If StringInStr($outputPane, "Exit code:") Then ExitLoop Sleep(500) WEnd MsgBox(262144, 'Debug line ~' & @ScriptLineNumber, 'Selection:' & @LF & '$outputPane' & @LF & @LF & 'Return:' & @LF & $outputPane & @LF & @LF & '@Error:' & @LF & @error) ;### Debug MSGBOX Edited January 14, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Bert Posted January 14, 2007 Author Share Posted January 14, 2007 Tried the code, and it causes the script to exit. In looking at the code, It will read what is in the output window. (which is what I asked for in the first place :"> ) This won't work for if a script has ran once, it will have the exit string already in the window) I'm going to need to read what comes out of Au3Check to keep it stable. I tried to use that, but I couldn't get it to work. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted January 14, 2007 Author Share Posted January 14, 2007 I came up with this, and I think this will solve my problem. I tested it, and I'm getting the results as expected. If WinExists("Au3Check errors","Do you want to stop the Run?") then WinWaitClose("Au3Check errors","Do you want to stop the Run?") if ProcessExists("Autoit3.exe") then ProcessWaitClose("Autoit3.exe") StopEx() Else StopEx() EndIf The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Developers Jos Posted January 14, 2007 Developers Share Posted January 14, 2007 I came up with this, and I think this will solve my problem. I tested it, and I'm getting the results as expected. If WinExists("Au3Check errors","Do you want to stop the Run?") then WinWaitClose("Au3Check errors","Do you want to stop the Run?") if ProcessExists("Autoit3.exe") then ProcessWaitClose("Autoit3.exe") StopEx() Else StopEx() EndIfDid you try the solution I PMed ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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