zxtnt09 Posted January 3, 2016 Posted January 3, 2016 (edited) Hi everyoneI try to use something like that but it's goin 0x error!$FilePath = FileOpen("settings.data") $FileRead = FileRead($FilePath) MsgBox(0,0,$FileRead) $FileClose = FileClose($FilePath)If i try to open .txt file it's fine and working perfectly but if i try to use with this format , i got error Thanks Edited January 3, 2016 by zxtnt09
InunoTaishou Posted January 3, 2016 Posted January 3, 2016 Your code works perfectly fine on my computer. Have you tried any error handling?$FilePath = FileOpen("settings.data") If ($FilePath = -1) Then MsgBox("", "", "Failed to open settings.data") Exit EndIf $FileRead = FileRead($FilePath) If (@Error) Then MsgBox("", "", "Error reading file, error code = " & @error & @CRLF & "Error message = " & (@error = -1 ? "End-of-file is reached, (Empty file)" : "File was not opened in read mode or other error")) Exit EndIf MsgBox(0,0,$FileRead) $FileClose = FileClose($FilePath)
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