rotatorkuf Posted March 28, 2015 Share Posted March 28, 2015 Global $inputRuns = GUICtrlCreateInput("3",10, 110, 40,20) GUICtrlCreateUpdown($inputRuns) GUICtrlSetLimit($inputRuns, 20, 6) So i want the updown to stop at 20 and 6 for max/min, but whenever i load up the gui/script, it goes past those values. What am I doing wrong? Link to comment Share on other sites More sharing options...
kylomas Posted March 28, 2015 Share Posted March 28, 2015 (edited) rotatorcuff, GuiCtrlSetLimit needs to reference the updown control. Try it like this... #include <GUIConstantsEx.au3> local $gui010 = guicreate('') Global $inputRuns = GUICtrlCreateInput("3",10, 110, 40,20) local $up = GUICtrlCreateUpdown($inputRuns) GUICtrlSetLimit($up, 20, 6) guisetstate() while 1 switch guigetmsg() case $gui_event_close Exit EndSwitch WEnd kylomas edit: This also works... #include <GUIConstantsEx.au3> local $gui010 = guicreate('') Global $inputRuns = GUICtrlCreateInput("3",10, 110, 40,20) GUICtrlCreateUpdown($inputRuns) GUICtrlSetLimit(-1, 20, 6) guisetstate() while 1 switch guigetmsg() case $gui_event_close Exit EndSwitch WEnd Edited March 28, 2015 by kylomas rotatorkuf 1 Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
rotatorkuf Posted March 28, 2015 Author Share Posted March 28, 2015 rotatorcuff, GuiCtrlSetLimit needs to reference the updown control. Try it like this... #include <GUIConstantsEx.au3> local $gui010 = guicreate('') Global $inputRuns = GUICtrlCreateInput("3",10, 110, 40,20) local $up = GUICtrlCreateUpdown($inputRuns) GUICtrlSetLimit($up, 20, 6) guisetstate() while 1 switch guigetmsg() case $gui_event_close Exit EndSwitch WEnd kylomas edit: This also works... #include <GUIConstantsEx.au3> local $gui010 = guicreate('') Global $inputRuns = GUICtrlCreateInput("3",10, 110, 40,20) GUICtrlCreateUpdown($inputRuns) GUICtrlSetLimit(-1, 20, 6) guisetstate() while 1 switch guigetmsg() case $gui_event_close Exit EndSwitch WEnd thank you so much, i'm dumb lol Link to comment Share on other sites More sharing options...
kylomas Posted March 28, 2015 Share Posted March 28, 2015 No, not dumb, just inexperienced. Please see my sig for how to post code. Good luck and Welcome to AutoIt, kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill 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