cad29 Posted October 10, 2006 Share Posted October 10, 2006 Hi i need help with my script the problem of my script is the button is not clickable anymore once you insert the Label in the script then thats the time you are able to click any one of the option please help thanks a lot HERES MY SCRIPT #include <GUIConstants.au3> GUICreate("Select Option",350,150,398,100,BitOR($WS_SYSMENU,$WS_MINIMIZEBOX));$WS_SYSMENU) $labelR = GUICtrlCreateLabel ("Please Select the following and click it ?", 41,10,350,150) GUICtrlSetColor(-1,0xFF0000) GUICtrlSetFont (-1,10, 800) GUICtrlSetColor(-1, 0x008CF5) ; sets the color of the letters GUISetFont (10, 400, 4, "Courier New Bold Italic") GUISetBkColor(0x000064) ; sets the bkgrnd color of the window ;GUICtrlCreateButton ( "text", left, top [, width [, height [, style [, exStyle]]]] ) $OPTION1 = GUICtrlCreateButton ("THIS IS OPTION # 1", 25, 30, 300,25) $OPTION2 = GUICtrlCreateButton ( "THIS IS OPTION # 2", 25, 60,300,25) $OPTION3 = GUICtrlCreateButton ("THIS IS OPTION #3" , 25, 90,300,25) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $OPTION1 msgbox(0,"Option Selected","You select option #1") ExitLoop Case $msg = $OPTION2 msgbox(0,"Option Selected","You select option #2") ExitLoop Case $msg = $OPTION3 msgbox(0,"Option Selected","You select option #3") ExitLoop EndSelect WEnd Link to comment Share on other sites More sharing options...
Helge Posted October 10, 2006 Share Posted October 10, 2006 You placed a long-fingered button-butt-loving label behind the buttons. This should fix it : GUICtrlSetState($labelR, $GUI_DISABLE) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 10, 2006 Moderators Share Posted October 10, 2006 Look at the height of your label... it underlaps the controls, so if your focus is on the label, then the buttons are not able to be clicked:#include <GUIConstants.au3> GUICreate("Select Option", 350, 150, 398, 100, BitOR($WS_SYSMENU, $WS_MINIMIZEBOX));$WS_SYSMENU) $labelR = GUICtrlCreateLabel("Please Select the following and click it ?", 41, 10, 350, 20) GUICtrlSetColor(-1, 0xFF0000) GUICtrlSetFont(-1, 10, 800) GUICtrlSetColor(-1, 0x008CF5) ; sets the color of the letters GUISetFont(10, 400, 4, "Courier New Bold Italic") GUISetBkColor(0x000064) ; sets the bkgrnd color of the window ;GUICtrlCreateButton ( "text", left, top [, width [, height [, style [, exStyle]]]] ) $OPTION1 = GUICtrlCreateButton("THIS IS OPTION # 1", 25, 30, 300, 25) $OPTION2 = GUICtrlCreateButton("THIS IS OPTION # 2", 25, 60, 300, 25) $OPTION3 = GUICtrlCreateButton("THIS IS OPTION #3", 25, 90, 300, 25) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $OPTION1 MsgBox(0, "Option Selected", "You select option #1") ExitLoop Case $msg = $OPTION2 MsgBox(0, "Option Selected", "You select option #2") ExitLoop Case $msg = $OPTION3 MsgBox(0, "Option Selected", "You select option #3") ExitLoop EndSelect WEnd 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...
cad29 Posted October 10, 2006 Author Share Posted October 10, 2006 Hi Helge your great it work thanks a lot for your help Link to comment Share on other sites More sharing options...
Valuater Posted October 10, 2006 Share Posted October 10, 2006 long-fingered button-butt-loving labelunderlaps the controlsI can see i am still learning a new language here at Autoitlol8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 10, 2006 Moderators Share Posted October 10, 2006 Hi Helge your great it work thanks a lot for your helpHis might work, but it's not the root of the issue, and people like me that have skinned themes on their windows, it comes out really bad when it's disabled with all the font settings. 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...
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