victor Posted November 8, 2005 Posted November 8, 2005 (edited) I wrote this but it doesn't work ... why ? ----------------------------------- $var2 = 400 $var = IniReadSectionNames("myfile.ini") If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Else For $i = 1 To $var[0] if IniRead ( "myfile.ini", "$var[$i]", "weight", "default" ) == $var2 Then MsgBox(4096, "", "yes it works") MsgBox(4096, "", $var[$i]) Next EndIf -------------------------------------- myfile.ini ----------------------- [links] height=400 weight=400 [links2] height=402 weight=402 Edited November 8, 2005 by victor
Danny35d Posted November 8, 2005 Posted November 8, 2005 At this line remove the qouts...if IniRead ( "myfile.ini", "$var[$i]", "weight", "default" ) == $var2 Then MsgBox(4096, "", "yes it works")it should be like thisif IniRead ( "myfile.ini", $var[$i], "weight", "default" ) == $var2 Then MsgBox(4096, "", "yes it works") AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
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