Proph Posted September 2, 2005 Share Posted September 2, 2005 I am trying to use IniRead IniWrite functions on my txtsetup.sif file to automate some file edits but it seems that autoit is getting rid of the EOF (End Of File) mark that is in the file. As far as I understand the EOF is very important. Does anyone know what I may be doing wrong? Or is this an autoit error? Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted September 2, 2005 Share Posted September 2, 2005 I am trying to use IniRead IniWrite functions on my txtsetup.sif file to automate some file edits but it seems that autoit is getting rid of the EOF (End Of File) mark that is in the file. As far as I understand the EOF is very important. Does anyone know what I may be doing wrong? Or is this an autoit error?<{POST_SNAPBACK}>according to my calculations you dont need EOF but post some of your script so we can help you more.. [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
Westi Posted September 2, 2005 Share Posted September 2, 2005 It seems your code is wrong. This works $var = IniReadSection("C:\TXTSETUP.SiF", "SourceDisksNames") If @error Then MsgBox(4096, "", "Error") Else For $i = 1 To $var[0][0] MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF & "Value: " & $var[$i][1]) Next IniWrite ( "C:\TXTSETUP.SiF", "SourceDisksNames", ";", "test" ) EndIf Link to comment Share on other sites More sharing options...
LxP Posted September 3, 2005 Share Posted September 3, 2005 INIRead() and INIWrite() both use calls to Windows itself to get the job done. If INIWrite() removes the EOF character from the end of your file then you can be pretty confident that INIRead() will never complain about it. Link to comment Share on other sites More sharing options...
Proph Posted September 3, 2005 Author Share Posted September 3, 2005 Maybe it has something to do with me using the Custom _iniread function? If so... is there any way for me to re-create the EOF? Link to comment Share on other sites More sharing options...
LxP Posted September 4, 2005 Share Posted September 4, 2005 All you would need to do is append Chr(26) to the end of the file in question. FileWrite() to the rescue! Link to comment Share on other sites More sharing options...
Proph Posted September 4, 2005 Author Share Posted September 4, 2005 Thanks for the help LxP. Link to comment Share on other sites More sharing options...
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