evilelf Posted June 23, 2009 Share Posted June 23, 2009 (edited) Basically Im making a label that will re-fresh upon wheneverFunc CheckConnection() is called. First I need to wait for the windowto exist then update the GUI like I wanted. - Ill figure out the Func Part but, Right now my ' ControlSetText 'Is making my App look double font like.Im new working with GUI but i think its the While part.N the next few hours, when im home I have a idea to fix this.I'll post my finddings but please if anyone can help post.()If WinActive(" Title ") ThenControlSetText($Form1, "", $Status,"Status: Connected")ElseIfControlSetText($Form1, "", $Status,"Status: Not Connected")EndIfand so on....()$Status = GUICtrlCreateLabel("Status: Not Connected", 352, 72, 100, 37)Func SmartBehavior() While $wait = 0 ;Checks If Window is Running then Updates The GUI - First time... DUH While $hello = 0 $MainWindow = WinExists(" Title ") If $MainWindow = 0 Then ControlSetText($Form1, "", $Status,"Status: Not Connected") ToolTip("Failed to read Program, Please Run Program Now.",0,0) Sleep(90) ElseIf $GuildWars = 1 Then $hello = 1 Sleep(90) ControlSetText($Form1, "", $Status,"Status: Connected") EndIfWEnd Edited June 23, 2009 by evilelf Link to comment Share on other sites More sharing options...
KenNichols Posted June 23, 2009 Share Posted June 23, 2009 Basically Im making a label that will re-fresh upon whenever Func CheckConnection() is called. First I need to wait for the window to exist then update the GUI like I wanted. - Ill figure out the Func Part but, Right now my ' ControlSetText ' Is making my App look double font like. Im new working with GUI but i think its the While part. N the next few hours, when im home I have a idea to fix this. I'll post my finddings but please if anyone can help post. () If WinActive(" Title ") Then ControlSetText($Form1, "", $Status,"Status: Connected") ElseIf ControlSetText($Form1, "", $Status,"Status: Not Connected") EndIf and so on.... () I think you are looking for GUICtrlSetData ( controlID, data [, default] ) GUICtrlSetData (Status, "Status: Not Connected") [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner! Link to comment Share on other sites More sharing options...
evilelf Posted June 23, 2009 Author Share Posted June 23, 2009 (edited) Thank You, I'll check this out soon as I can and ill post back.; Edited- Thank You , 'KenNichols'.Works 100% and no problems. Edited June 23, 2009 by evilelf Link to comment Share on other sites More sharing options...
evilelf Posted June 27, 2009 Author Share Posted June 27, 2009 (edited) * New Problem, But Same Topic *I really dont know the problem, Ive looked thrue the AutoIt Help& theres nothing to help me. My 3 will update my lable as 29 or something else.Need more depth ill post, Im just looking for some help.Im trying to update something on my GUI like so.$LabelCount = GUICtrlCreateLabel("Total: 0 / 0", 296, 96, 91, 17) $User_FileCount = GUICtrlCreateInput("3", 256, 88, 57, 21,$ES_NUMBER) ; some code GUISetState(@SW_SHOW) ;Other Code. If GUICtrlRead($User_FileCount) = 0 Then MsgBox(0,"Error","Your Number Must be Greater Then Zero, Please ReStart App.") Exit EndIf GUICtrlRead($User_FileCount) GUICtrlSetData($LabelCount,$User_FileCount) Edited June 28, 2009 by evilelf Link to comment Share on other sites More sharing options...
evilelf Posted June 28, 2009 Author Share Posted June 28, 2009 Bumb for today, I still cant seem to figure this one out. I'm going to be out today so maybe ill think of something fresh. Link to comment Share on other sites More sharing options...
Zedna Posted June 28, 2009 Share Posted June 28, 2009 (edited) $LabelCount = GUICtrlCreateLabel("Total: 0 / 0", 296, 96, 91, 17) $User_FileCount = GUICtrlCreateInput("3", 256, 88, 57, 21,$ES_NUMBER) ; some code GUISetState(@SW_SHOW) ;Other Code. $FileCount = GUICtrlRead($User_FileCount) If $FileCount = 0 Then MsgBox(0,"Error","Your Number Must be Greater Then Zero, Please ReStart App.") Exit EndIf GUICtrlSetData($LabelCount,$FileCount) Edited June 28, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
evilelf Posted June 28, 2009 Author Share Posted June 28, 2009 Thank you. It works but a bit flashing for right now, thats my bad. Thank you again. 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