ParoXsitiC Posted September 12, 2007 Posted September 12, 2007 (edited) I am trying to update a UDF to work with the current version of AutoIT. It is a multithread UDF located here: http://www.autoitscript.com/forum/index.ph...outine&st=0It is mostly not working because of the many changes to StringRegExp in the past year or so. One of the biggest difficulties I am coming to is the use of \#. Is there anyway to emulate this in the newer StringRegExp?For those who are not familiar with what \# use to do, here is a line from the old help file:\# Position. Record the current character location in the test string into the returned content array. Here are some examples of the UDF using it:$sReturnStr = StdoutRead($iPID) $iNumChrsToRead = StringRegExp($sReturnStr, "(\d*?)(\#)(?:\$\[)", 1) $sReturnStr = StringTrimLeft($sReturnStr, $iNumChrsToRead[1]) While StringLen($sReturnStr) < $iNumChrsToRead[0] $sReturnStr &= StdoutRead($iPID) WEndI attempted to fix it with this code, but it doesnt always work for everything:$sReturnStr = StdoutRead($iPID) $iNumChrs = StringRegExp($sReturnStr, "(\d*?)(?:\$\[)", 1) $iNumChrsToRead = StringLen($iNumChrs[0]) $sReturnStr = StringTrimLeft($sReturnStr, $iNumChrsToRead) While StringLen($sReturnStr) < $iNumChrs[0] $sReturnStr &= StdoutRead($iPID) WEnd Edited September 12, 2007 by ParoXsitiC
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