toothyXdip Posted February 18, 2007 Share Posted February 18, 2007 (edited) when somethings control id is a number (like GUICtrlSetState below) where do you find the number and how can a button and a lable have teh same control id number like this scipt from the help menu #include <GUIConstants.au3> GUICreate("My GUI state") ; will create a dialog box that when displayed is centered GUICtrlCreateLabel ("my disable label", 10,20) GUICtrlSetState(-1,$GUI_DISABLE) ; the label is in disable state GUICtrlCreateButton ("my button", 50,50) GUICtrlSetState(-1,$GUI_FOCUS) ; the focus is on this button GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend What would the id be if i had 2 buttons and 2 lables and how would i find them? P.S. like i said before REALLY nooby question Edited February 18, 2007 by toothyXdip ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 18, 2007 Moderators Share Posted February 18, 2007 Make each control a variable, the variable will hold the control name. $Main = GUICreate() will hold the hwnd of the GUI $Edit = GUICtrlCreateEdit() will hold the control id of the Edit control $Edit2 = GUICtrlcreateEdit() will hold the control id of this edit control etc.... Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Helge Posted February 18, 2007 Share Posted February 18, 2007 ..and how can a button and a lable have teh same control id number like this scipt from the help menu..They don't have the same controlID, as -1 only refers to the last created control. 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