Jump to content

Ive always wondered something


Recommended Posts

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 by toothyXdip
---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝
Link to comment
Share on other sites

  • Moderators

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...