Page 1 of 1

For Loop Syntax

PostPosted: Tue Jan 03, 2017 5:28 pm
by chrisr
Hey all,
I wanted to post this, as it took me a bit to figure out the new syntax for the For Loop.

OLD WAY:
Code: Select all
For 1 to 10
WDControlShow,Labelfor.index               // Example 1
WDCustomScriptTint,for.index,255,0,0       // Example 2
Next



NEW WAY:
Code: Select all
For i = 1 to 10
   {
   WDControlShow("Label"+i)                // Example 1
   WDCustomScriptTint(i,255,0,0)         // Example2
   }


There is also a new step feature. It looks like this

Code: Select all
For i = 1 to 10 Step 2

This allows you to select every other item in the loop. this would run 1,3,5,7,9 inside of the 10 steps of the for loop.