mini Posted April 21, 2010 Share Posted April 21, 2010 (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: expandcollapse popup#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 April 21, 2010 by mini [size="4"]My first work[/size], it checks if one prograrm is running and if not it closes all necessery windows and run them again.[size="4"]My second work[/size], Script Function: It saves a Client Info and creates a INI file for all clients with all the info.[size="4"]My third work[/size], Script Function: It change some INFO on a working program, every X min configured. Link to comment Share on other sites More sharing options...
Fire Posted April 21, 2010 Share Posted April 21, 2010 It must be at line 18 in your code: GUICtrlSetState($KS1, IniRead("example.ini", "KS,SD", "KS1", "4")) small mistake [size="5"] [/size] Link to comment Share on other sites More sharing options...
mini Posted April 21, 2010 Author Share Posted April 21, 2010 It must be at line 18 in your code: GUICtrlSetState($KS1, IniRead("example.ini", "KS,SD", "KS1", "4")) small mistake 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. [size="4"]My first work[/size], it checks if one prograrm is running and if not it closes all necessery windows and run them again.[size="4"]My second work[/size], Script Function: It saves a Client Info and creates a INI file for all clients with all the info.[size="4"]My third work[/size], Script Function: It change some INFO on a working program, every X min configured. Link to comment Share on other sites More sharing options...
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