Jump to content

Recommended Posts

Posted

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?

Posted

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]

Posted

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
Posted
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.
Posted

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?

Posted

All you would need to do is append Chr(26) to the end of the file in question. FileWrite() to the rescue!

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
  • Recently Browsing   0 members

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