Phil Viton Posted February 15, 2006 Share Posted February 15, 2006 I'm just starting to write AutoIt scripts, but could someone tell me what's wrong with the UpDown control in the code below? It's based pretty much on the example in the documentation; it looks fine; but I can't actually increase/or decrease the value; and once I move off it, I can't select it again. Thanks! ========== code #include <GuiConstants.au3> ;create the GUI GuiCreate("Run Web2c",300,150,400,300) GuiCtrlCreateLabel("LaTeX passes: ",10,50,140) $passlatex = GuiCtrlCreateInput("2",90,50,40) $updown=GuiCtrlCreateUpDown($passlatex) GuiCtrlSetLimit($updown,1,4) $okbutton = GuiCtrlCreateButton("OK",10,120,50) $cancelbutton = GuiCtrlCreateButton("Cancel",70,120,50) ; put up the GUI GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $okbutton ; get the data $passes=GuiCtrlRead($updown) ExitLoop Case $msg = $cancelbutton $msg = $GUI_EVENT_CLOSE EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend ====== end code Link to comment Share on other sites More sharing options...
Holger Posted February 15, 2006 Share Posted February 15, 2006 (edited) Maybe this: GuiCtrlCreateLabel("LaTeX passes: ",10,50,140) overlaps your $passlatex and $updown - controls. Just reduce the width (140) of the label a little bit, cause you input control starts at coords: 90. I.e.: GuiCtrlCreateLabel("LaTeX passes: ",10,50,80) 80 is maximum, cause 10 + 80 = 90 -> where the input starts. Edited February 15, 2006 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
Phil Viton Posted February 15, 2006 Author Share Posted February 15, 2006 Yes, that was exactly right - thanks for the immediate feedback! 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