Sign in to follow this  
Followers 0
muzle6074

Can someone please help me with iniread?

4 posts in this topic

#1 ·  Posted (edited)

Hi everyone,

I want to read from an ini file, i tried the help file but I couldn't get it working.

The ini file looks like this:

[delays]
"Sleep"=60

I tried the following code:

$var = IniRead("C:\Documents and Settings\user\My Documents\au3\+1\+1_config.ini", "Delays", "Sleep", "Not Found")
If @error Then
    MsgBox(0, "", $var)
Else
    MsgBox(0, "", "Error")
EndIf

Someone please help! ;)

*Edit - Ok spotted my noob error, @error should be If Not @error, however how can I read the data from the file?

Edited by muzle6074

Share this post


Link to post
Share on other sites



No its not.. ;)

Try this code.

Local $file = @tempdir & "\slettes.ini"
IniWrite($file, "test","test1","test1")
msgbox(48, "IniRead Test", IniRead($file, "test", "test1", "Failed to read ini"))
FileDelete($file)

Verify that the file actually exists (FileExists) in your own code?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

*Edit - NVM, sorry im so noob today :D

thx for ur help ;)

Edited by muzle6074

Share this post


Link to post
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
Sign in to follow this  
Followers 0