Vindicator209 Posted August 26, 2006 Posted August 26, 2006 (edited) I am building a text based adventure with a gui with multiple commands like go left, go right, pick up item or something like that, i need a counter for how many times a button was clicked counting down, ive tried making an updown and having the maximum and minimum on 100 but have another button that would -1 to it but it is still editable... can this be done elsewise? i have tried: GuiSetState(@SW_DISABLE,$count) -and- $count = GuiCtrlCreateInput("200",860, 600, 50, 25,$ES_READONLY) but didnt work out Edited August 26, 2006 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]
GaryFrost Posted August 26, 2006 Posted August 26, 2006 #include <GUIConstants.au3> GUICreate(" My GUI input", 320,120) $input = GUICtrlCreateInput ( "", 10, 5, 300, 20) $btn = GUICtrlCreateButton ("Ok", 40, 75, 60, 20) GUICtrlSendMsg($input, $EM_SETREADONLY, True, 0) GUICtrlSetBkColor($input, 0xFFFFFF) GUISetState () GUICtrlSetData($input,"my disabled input") $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn exitloop EndSelect Wend MsgBox (4096, "Result", GUICtrlRead($input)) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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