Jump to content

Preserve EOF?


Proph
 Share

Recommended Posts

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...