evilelf Posted November 25, 2008 Share Posted November 25, 2008 I cant seem to get the GUI to show my Total Runs/Run_Count. $Label1 = GUICtrlCreateLabel("Total Runs:", 24, 112, 80, 17) Func _TotalRuns() $TotalRuns = $Runden; $i GUICtrlSetData($Label1,"Total Runs:",$TotalRuns) EndFunc Func start() For $i = $Runden to 0 step -1 Call("TotalRuns") Call("Click") Next EndFunc Link to comment Share on other sites More sharing options...
IndyUK Posted November 25, 2008 Share Posted November 25, 2008 I cant seem to get the GUI to show my Total Runs/Run_Count. $Label1 = GUICtrlCreateLabel("Total Runs:", 24, 112, 80, 17) Func _TotalRuns() $TotalRuns = $Runden; $i GUICtrlSetData($Label1,"Total Runs:",$TotalRuns) EndFunc Func start() For $i = $Runden to 0 step -1 Call("TotalRuns") Call("Click") Next EndFunc you don't appear to be call the start function...which means nothings running. try Call("start") at the beginning. Link to comment Share on other sites More sharing options...
evilelf Posted November 26, 2008 Author Share Posted November 26, 2008 I do, Func button1() Call("start") EndFunc Its just the GUICtrlSetData is not working... i want it to update label Link to comment Share on other sites More sharing options...
mmavipc Posted November 26, 2008 Share Posted November 26, 2008 please post the whole script [size="10"]Pure Au3 crypt funcs(I'm currently also working on making a dll from this)[/size][Y] Be more active in the community[Y] Get 200 posts[N] Get 300 posts[N] Make a Topic in the example scripts forum with at least 50 replies.People who currently hate me:ValikSmOke_N Link to comment Share on other sites More sharing options...
Robjong Posted November 26, 2008 Share Posted November 26, 2008 change this GUICtrlSetData($Label1,"Total Runs:",$TotalRuns) to this. GUICtrlSetData($Label1, "Total Runs: " & $TotalRuns) not sure just thought that wasnt right, the 3rd param specifies a default value u can use in a combobox or some. Link to comment Share on other sites More sharing options...
evilelf Posted November 26, 2008 Author Share Posted November 26, 2008 change this GUICtrlSetData($Label1,"Total Runs:",$TotalRuns) to this. GUICtrlSetData($Label1, "Total Runs: " & $TotalRuns) not sure just thought that wasnt right, the 3rd param specifies a default value u can use in a combobox or some. Its still not working... Its now showing up in my GUI... Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 26, 2008 Share Posted November 26, 2008 Its still not working... Its now showing up in my GUI... You didn't show us any of your GUI or how you were calling the function you did show, and Robjong was right that you had the parameters wrong. It works fine like this: #include <GuiConstantsEx.au3> Global $TotalRuns = 0 Global $hGUI = GUICreate("Test", 300, 200) Global $Label1 = GUICtrlCreateLabel("Total Runs: 0", 20, 20, 260, 20) Global $Button1 = GUICtrlCreateButton("RUN", 100, 150, 100, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Button1 $TotalRuns += 1 GUICtrlSetData($Label1,"Total Runs: " & $TotalRuns) EndSwitch WEnd Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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