Sign in to follow this  
Followers 0
Vindicator209

Labeling instances

1 post in this topic

Well, I'm trying to compile a list of classes within a window using WinGetClassList() but I need to put instances after each one (button1, button2,button3) instead of just (button,button,button)

The format I have it churn out is already "edit|edit|edit|button|button)

How can I slap a number (starting from 1) onto each button or edit?

This is what I tried, ($controls is an array of all the controls, $listcon being an already stringed-together list of controls in "edit|edit" format)

For $s = $controls[0] To 1 Step -1

StringReplace($listcon,$controls[$y],$controls[$y] & $s, $s)

Next

What I THOUGHT this would do is change all of them to a certain number as the count went down (last parameter in that), leaving the changed ones unchanged.

I THOUGHT it would act like this:

"edit|edit|edit|edit"

"edit4|edit4|edit4|edit4"

"edit3|edit3|edit3|edit4"

"edit2|edit2|edit3|edit4"

"edit1|edit2|edit3|edit4"

well

"4444"

"3334"

"2234"

"1234"


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

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  
Followers 0