Embedding a For Loop inside another For Loop
Posted: Tue Sep 19, 2017 5:49 pm
Hello All!! I have what is a probably a really easy question for some of you. Though I am struggling a bit with the syntax. I have some Custom script buttons, lets say addressed 1001 to 1032. I want to label these buttons IN 1 to IN 32. So this is what I've tried. No luck yet, but still working it.
AM I way way off? or getting close. I've tried a couple other ways to do this, this code above labels all the buttons IN 32. I've also tried the following, I moved both For Loops outside the brackets.
That doesnt run at all. I guess my question is why does the first script only return 32 for each label.
Thanks again for any help. This one is boggling me a bit. Nesting a for loop has come up a couple times for me. I've never been able to get something like this to work. So I've just done the good ole right click and changed it. Just looking to speed up this process
Have a great week everyone!!
Cheers,
Chris
- Code: Select all
For i = 1001 to 1032
{
For x = 1 to 32
{
WDCustomLabel(i,"IN" +x)
}
}
AM I way way off? or getting close. I've tried a couple other ways to do this, this code above labels all the buttons IN 32. I've also tried the following, I moved both For Loops outside the brackets.
- Code: Select all
For i = 1001 to 1032
For x = 1 to 32
{
WDCustomLabel(i,"IN" +x)
}
That doesnt run at all. I guess my question is why does the first script only return 32 for each label.
Thanks again for any help. This one is boggling me a bit. Nesting a for loop has come up a couple times for me. I've never been able to get something like this to work. So I've just done the good ole right click and changed it. Just looking to speed up this process
Have a great week everyone!!
Cheers,
Chris