Hello!
Thanks all of your replies!
@lexikos:
Sorry for my limited English writing ability.
Yes, you are right!
It's a simplified version which has the same (I think) issue I met actually.
The real one does the following things:
Code: Select all
TempFile = zzz.txt
UpdateVersionKeyword = <td>19.0.0.226</td>
FlashUpdateUrl = https://www.adobe.com/software/flash/about/
UrlDownloadToFile, %FlashUpdateUrl%, %TempFile%
; Try to get version info from server response
FileRead, fileContent, %TempFile%
len := StrLen(fileContent)
if (0 != InStr(fileContent, UpdateVersionKeyword)) {
; Your Flash player is up-to-date!
MsgBox, UPD
} else {
; Notify user
MsgBox, NOOP
}
ListVars
Pause
ExitApp
It get webpage from that URL and try to search for specific keyword I want and then do something.
Several
NULL characters are there for unknown reason. It's normal before 11/02.
In this case,
InStr() will not search texts after those
NULL characters.
It will always
return 0(string not found) and then reached "; Notify user" section.
If
FileAppend/
InStr() are designed to process text, it's not a bug since
NULL character is invalid and may be treated as the end of string (C-style string).
Using
StrLen() to get the length, you will get "146030" which is the same as I see when running
ListVars window:
fileContent[146030 of 146030] but you are not able to search some text in it! Maybe it should have the same behavior as
FileAppend/
InStr(), count total string length just until
NULL characters (truncate remaining data)?
I can do some workaround on this but I'd also like to know if there is other way to locate string/data in the whole variable data in faster way? (Assume it don't have encoding/linefeed conversion issue)