nill Posted June 21, 2023 Posted June 21, 2023 (edited) Using $text = StdoutRead($_plinkhandle) I get the text from the console like this echo $? 0 How can I process this text in autoit to read what value comes after $? ignoring the line feed ? Edited June 21, 2023 by nill
Solution Andreik Posted June 21, 2023 Solution Posted June 21, 2023 Something like this? #include <Array.au3> $sData = 'echo $? whatever data is here' & @LF & '0' $aMatches = StringRegExp($sData, 'echo \$\?(.+)', 3) _ArrayDisplay($aMatches) nill 1
nill Posted June 21, 2023 Author Posted June 21, 2023 7 hours ago, Andreik said: Something like this? #include <Array.au3> $sData = 'echo $? whatever data is here' & @LF & '0' $aMatches = StringRegExp($sData, 'echo \$\?(.+)', 3) _ArrayDisplay($aMatches) It doesn't work or I don't understand something I got $aMatches=1 Not array
Andreik Posted June 21, 2023 Posted June 21, 2023 1 hour ago, nill said: It doesn't work or I don't understand something I got $aMatches=1 Not array In the example above result of $aMatches is definitely not 1. Show me what you run when you got this result. nill 1
nill Posted June 21, 2023 Author Posted June 21, 2023 Yea you are right I used another string for checking
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