Aceguy Posted June 4, 2006 Share Posted June 4, 2006 this is what i would like to. imput a value in an inputbox,, like 10. Then everytime i click the go button, it takes 1 off of ten, and displays it in the box till it reaches 0. (so i will need to click go 10 times.) Global $Qty_synth #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 150, 200, 900, 150) $Go = GUICtrlCreateButton("Go!!!", 24, 64, 97, 33) $Qty_synth = GUICtrlCreateInput(0, 10, 150, 175, 20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $Go $Qty_synth = GUICtrlRead($Qty_synth) $Qty_synth = $Qty_synth - 1 Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd This is prolly a piece of cake for you guys Thanks [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Emperor Posted June 4, 2006 Share Posted June 4, 2006 (edited) Welcome to the forums What you should do is whenever the Go button is pressed, store the number somewhere, take 1 from it, then put it back into the input box. Global $Number #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 150, 200, 900, 150) $Go = GUICtrlCreateButton("Go!!!", 24, 64, 97, 33) $Qty_synth = GUICtrlCreateInput(0, 10, 150, 175, 20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $Go $Number = GUICtrlRead($Qty_synth) If $Number > 0 Then $Number = $Number - 1 GUICtrlSetData($Qty_synth, $Number) EndIf Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Other than that good job, except it isnt a good idea to use the same variable that holds the handle to the input box to store your number. Edited June 4, 2006 by Emperor Link to comment Share on other sites More sharing options...
Aceguy Posted June 4, 2006 Author Share Posted June 4, 2006 you sooooooooo totally rock, TY soooooooooooo much . [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock 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