Jump to content
Sign in to follow this  
Phil Viton

non-working UpDown

Recommended Posts

Phil Viton

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.


========== 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)



$okbutton = GuiCtrlCreateButton("OK",10,120,50)

$cancelbutton = GuiCtrlCreateButton("Cancel",70,120,50)

; put up the GUI


While 1

$msg = GUIGetMsg()


Case $msg = $okbutton

; get the data



Case $msg = $cancelbutton



If $msg = $GUI_EVENT_CLOSE Then ExitLoop


====== end code

Share this post

Link to post
Share on other sites

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 by Holger

Share this post

Link to post
Share on other sites
Phil Viton

Yes, that was exactly right - thanks for the immediate feedback!

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this