Can someone tell me what Im doing wrong in this script?
AutoIt
Local $file = FileOpen("test.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in 4 character at a time until the EOF is reached While 1 Local $chars = FileRead($file, 4) If @error = -1 Then ExitLoop WEnd FileClose($file) If $chars > 10 Then MsgBox(0, "Char read:", "Yes") ElseIf $chars < 10 Then MsgBox(0, "Char read:", "No") EndIf Exit
The number in the .txt is 22 but I get MsgBox with "No"
Thanks guys!