Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How do i control a button created with an array?

$
0
0

Hello

I hope you can understand what i mean.

I generate buttons, depending on data.

 

$button is an array in this case.

 

So it goes something like this:

Do   $count = $count + 1   $button[$count] = GUICtrlCreateButton("Name" & $counter, 400, etc.... Until $count = 5

Is there any way to control the buttons and check the number in []?

Or do i have to write all the possible cases by hand like this?

case $button[1] case $button[2]

Is there any kind of wildcard or something i could use to make one case for all $button[ ] and pass the arraynumber on like this?

case $button[arraynumber]           Msgbox(0, "test", "Button: " & arraynumber & " pressed")

I hope you understand what i mean.


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>