Jump to content

Strange problem with GUICtrlCreateUpdown


Fraggle
 Share

Recommended Posts

Hi,

i wrote a little GUI Setup that is able to read, change and write settings from a config.ini

within this GUI setup i use 16 GUICtrlCreateUpdown like this one:

$test1 = IniRead("config.ini", "Global", "test1", "75")

GuiCtrlCreateLabel("Test1t", 120, 165)
$_test1 = GUICtrlCreateInput ($test1,123,180, 35, 20)
GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1,8,1)

IniWrite("config.ini", "Global", "test1", $_test1)

and they all work perfect, i always get the right values from the config.ini and also the right values will be written.

then i put in a 17th GUICtrlCreateUpdown like the others on the 3rd position within this GUI

GuiCtrlCreateLabel("Problem1", 285, 300)
$_problem1 = GUICtrlCreateInput ($problem1, 295, 315, 35, 20)
GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1,60,1)

but in this case $_problem1 is always 33 doesnt matter what value i choose.

i copy & paste this one as 18th GUICtrlCreateUpdown on 4th position

GuiCtrlCreateLabel("Problem2", 285, 300)
$_problem2 = GUICtrlCreateInput ($problem2, 295, 315, 35, 20)
GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1,60,1)

and this where the moment i lost my mind then in this case $_problem2 was always 36

i changed the 18th GUICtrlCreateUpdown a little bit and wrote a litte test to see what will happen if i click the up ur down arrow

GuiCtrlCreateLabel("Problem2", 285, 300)
$_problem2 = GUICtrlCreateInput ($problem2, 295, 315, 35, 20)
$_problem2updown = GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1,60,1)


While 1
    $msg = GUIGetMsg()
       Select
        Case $msg = $_problem2updown
                          MsgBox(4096,"",$_problem2)
             Case .......
                  ...................
                   ....................
       EndSelect
WEnd

and what shall i say.........

everytime i click the up or down arrow the MsgBox shows me the same value...

36 for the 18th and 33 for the 17th GUICtrlCreateUpdown.

so what can be the problem ???

did i something wrong ? i checked everything again and again and the 16 GUICtrlCreateUpdown i made first all still work fine...

or is there a GUI Limit that i exceed ?

or maybe a AutoItv3 bug ??

i have no idea.....

P.S.

I split my GUI menu with some GUICtrlCreateTab and put one of the problem GUICtrlCreateUpdown into every tab

the fix values are now:

1.) $_problem = 33

2.) $_problem2 = 42

3.) $_problem3 = 62

4.) $_problem4 = 72

5.) $_problem5 = 97

every GUICtrlCreateUpdown is on the same position on every tab cuase all have the same same X,Y,WX,WY values

Edited by Fraggle
Link to comment
Share on other sites

Use GUICtrlRead(inputcontrolID) to get the value of the input control!

At the moment I think you get the ID of the control :)

<{POST_SNAPBACK}>

omg.........

ur right....

never script after 24h without sleep and more coffee into ur body then blood... :D

ty

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
 Share

  • Recently Browsing   0 members

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