muzle6074 Posted August 22, 2008 Posted August 22, 2008 (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 August 22, 2008 by muzle6074
Uten Posted August 22, 2008 Posted August 22, 2008 Think it is case sensitive. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
Uten Posted August 22, 2008 Posted August 22, 2008 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? Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
muzle6074 Posted August 22, 2008 Author Posted August 22, 2008 (edited) *Edit - NVM, sorry im so noob today thx for ur help Edited August 22, 2008 by muzle6074
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