Jump to content

How to read a value from text


Go to solution Solved by Andreik,

Recommended Posts

Posted (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 by nill
Posted
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

Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...