Jump to content

GUICtrlSetLimit : use a variable instead of fix-value


Recommended Posts

Hi all,

i just begin to code with Autoit and i try to make something really simple : use a variable in the GUICtrlSetLimit function.

Basically, I would like to have a changing max in an Updown control. So... this is the code :




The $max variable is declared and when i put it in a label to check it, the value change as i want. But the CtrlSetLimit doesn't take it and the Max parameter stays at 0 (even when $max is set to another value). :whistle:

Where is the mistake.... may be could you help me...

Many thanks in advance and apologizes for my english... i hope my post is clear enough... :P

Edited by Yaourth
Link to comment
Share on other sites

There is no mistake here - if $max is declared and it has a value then it is working.

I've tested it using $max = 30 and it works.

see for yourself:

#include "GUIConstants.au3"

$title = "My GUI UpDown"
GUICreate($title,-1,-1,-1,-1, $WS_SIZEBOX)

$max = 30
GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...