Tripredacus Posted May 18, 2012 Author Posted May 18, 2012 (edited) I did 2 compares. First a visual one. I output the results to messagebox, as I know for sure, the 3rd value in $bin appears here:I already have $sModel set to be shown in the GUI for my own purposes, and it visually matches:Those are photos because I am testing in WinPE on actual hardware. I also had a log file written using this code:_FileWriteToLine("x:windowssystem32autoit.log", 1 ,"Var Log File with pipes", 1) _FileWriteToLine("x:windowssystem32autoit.log", 2 ,"sModel: |" & $sModel & "|", 1) _FileWriteToLine("x:windowssystem32autoit.log", 3 ,"StringStripWS sModel: |" & StringStripWS($sModel, 8) & "|", 1) _FileWriteToLine("x:windowssystem32autoit.log", 4 ,"bin 3: |" & $bin[3] & "|", 1) _FileWriteToLine("x:windowssystem32autoit.log", 5 ,"StringStripWS bin 3: |" & StringStripWS($bin[3], 8) & "|", 1)Which yielded these results:Var Log File with pipes sModel: |Z1-7596| StringStripWS sModel: |Z1-7596| bin 3: |Z1-7596| StringStripWS bin 3: |Z1-7596|Now this particular example, there is no whitespace (as you can see) however there are systems in the field that do. I had tested without StringStripWS but to no avail. Since the match does actually exist, I am thinking the problem is with the $r variable. I had tried changing it to other ones like $j but no change. It is declared as a Local in the code, I may try Global and see if that makes any difference.EDIT: declaring as Global didn't make a difference. Edited May 18, 2012 by Tripredacus Twitter | MSFN | VGCollect
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