Jump to content

Return each GUI ctrl


Recommended Posts

I have a GUI with 100 odd buttons I have created. I need to loop through each one and query the Text on it.

I hope you have the button ID's in an array?

If not, put them in there. If the buttons could be auto-created that would be very easy.

Dim $array[100]
For $i = 0 To 99
    $array[$i] = GUICtrlCreateButton("Text", 10, $i * 20, 50, 20)
Next

Then check with:

For $i = 0 To 99
    If GUICtrlRead($array[$i]) = "Text you want to check on" Then
         'do stuff'
    EndIf
Next
Edited by Triblade

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

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...