LithiumLi Posted April 19, 2009 Share Posted April 19, 2009 I am not on my computer and am leaving this here so I can access it later and when I finally finish the hangman game ill update this post. This does give a example of how to use a loop to save you time instead of having to write the same thing out 50 times #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $Letter[14] GUICreate("Hang", 650, 600) GUISetBkColor(0) $LabelLeft = 0 For $i = 1 To 13 Step +1 $Letter[$i] = GUICtrlCreateLabel("A", $LabelLeft, 0, 50, 50) $LabelLeft+= 50 GUICtrlSetFont($Letter[$i] , 24, 400, 0, "MS Sans Serif") GUICtrlSetColor($Letter[$i], 0xFF0000) ;GUICtrlSetBkColor($Letter[$i], 0x000000) Next $ButtonLeft = 0 For $i = 65 To 90 Step +1 GUICtrlCreateButton(Chr($i) , $ButtonLeft , 600 - 20 , 25 , 20) $ButtonLeft+= 25 Next GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd 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