frank10 Posted December 7, 2014 Share Posted December 7, 2014 (edited) If I run my script from Scite I can see all the ConsoleWrite executed by the script. I want to see the Consoleout of a running script , started outside Scite ( even using another Consoleout program if needed). Is this possible? PS: I tried with DebugView with no luck. Edited December 7, 2014 by frank10 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 7, 2014 Moderators Share Posted December 7, 2014 (edited) ConsoleRead()? StdoutRead()? Or are you trying to "hijack" another apps output? Edited December 7, 2014 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
frank10 Posted December 7, 2014 Author Share Posted December 7, 2014 I have an autoit3.exe process running with some consolewrite() in it. Then I launch from Scite this script: Local $aProcessList = ProcessList("AutoIt3.exe") Local $iPID = $aProcessList[1][1] Local $sOutput ='' while 1 $sOutput = StdoutRead($iPID) if $sOutput <> '' Then ConsoleWrite( $sOutput & @CRLF) Sleep(10) WEnd But I don't get any Consolewrite from that autoit's PID. Link to comment Share on other sites More sharing options...
JohnOne Posted December 7, 2014 Share Posted December 7, 2014 How are you certain that that PID is not the current PID of the new script? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
frank10 Posted December 7, 2014 Author Share Posted December 7, 2014 Good question. But I checked with arraydisplay and msgbox. The PID that remains unchanged is the one I want to get the Consolewrite: so, yes I checked it and it's correct, the first PID of the $aProcessList. Link to comment Share on other sites More sharing options...
JohnOne Posted December 7, 2014 Share Posted December 7, 2014 Off the top of my head, I think the target process has to be a child of the reading process, and started with STDCHILD flag. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
frank10 Posted December 7, 2014 Author Share Posted December 7, 2014 (edited) mmm, yes, I think that's the problem. But I don't want to link the two scripts, I wolud like to see the consoleout of a general script without to restart it into Scite, (even using an external prog to monitor)... Edited December 7, 2014 by frank10 Link to comment Share on other sites More sharing options...
JohnOne Posted December 7, 2014 Share Posted December 7, 2014 Well you're staring down the barrel of code injection, and since the target process is undoubtedly AutoIt, I'd tread very carefully from this point on. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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