Sign in to follow this  
Followers 0
mini

[SOLVED]On execution of GUI autoload INI ERROR Syntax.

3 posts in this topic

#1 ·  Posted (edited)

Hello AutoIT'ers.

Today i decided to make a little change on my GUI, but i encounter a Error that i cant understand why its happening.

Maybe you guys can see the error more easy then me.

I try in two different ways to see if it worked, i can load all the rest of the ini info to my GUI.

Sow here's the syntax error:

C:\Documents and Settings\ras00l\Desktop\SBot_AC\Sbot\Swapper.au3(102,97) : ERROR: syntax error
$iRead = GUICtrlSetState($KS1, IniRead("example.ini", "KS,SD", "KS1", "4")

If i change $iRead = GUICtrlSetState to GUICtrlSetState(bla bla bla) i get error to...

can some one explain to me what am I doing wrong please.

Here's my code:

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("AUTO LOAD INI", 373, 305)

$hInput1 = GUICtrlCreateInput("", 16, 8, 121, 21)
$hInput2 = GUICtrlCreateInput("", 16, 48, 121, 21)
$hInput3 = GUICtrlCreateInput("", 16, 80, 121, 21)
$KS1 = GUICtrlCreateCheckbox("KS", 10, 170, 110, 17)

$Button_Save = GUICtrlCreateButton("Save", 75, 270, 50, 25)

$iRead = GUICtrlSetData($hInput1, IniRead("example.ini", "example", "First_name", "N/A"))
$iRead = GUICtrlSetData($hInput2, IniRead(@ScriptDir & "\example.ini", "example", "Data", "N/A"))
$iRead = GUICtrlSetData($hInput3, IniRead(@ScriptDir & "\example.ini", "example", 3, "N/A"))
$iRead = GUICtrlSetState($KS1, IniRead("example.ini", "KS,SD", "KS1", "4")

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button_Save
            _Check4Start()

    EndSwitch
WEnd

Func _Check4Start()
    IniWrite("example.ini", "example", "First_name", GUICtrlRead($hInput1))
    IniWrite(@ScriptDir & "\example.ini", "example", "Data", GUICtrlRead($hInput2))
    IniWrite("example.ini", "example", "3", GUICtrlRead($hInput3))
    IniWrite("example.ini", "KS,SD", "KS1", GUICtrlRead($KS1))
EndFunc   ;==>_Check4Start
Edited by mini

Share this post


Link to post
Share on other sites



It must be at line 18 in your code:

GUICtrlSetState($KS1, IniRead("example.ini", "KS,SD", "KS1", "4"))

small mistake :idea:


[size="5"] [/size]

Share this post


Link to post
Share on other sites

It must be at line 18 in your code:

GUICtrlSetState($KS1, IniRead("example.ini", "KS,SD", "KS1", "4"))

small mistake :idea:

BAHHH, and i wasn't understanding you replay... and them came the "light" =P i was missing 1 big Fat -->> )

I'm blind some times =P

Thx for fast replay friend.

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