Assign random
Customer Order #'s and
Colors (red, green and blue)
to the blocks in your SCHEDULE region.
Tip: Don't forget to use the .modify method after making the changes or the block's attributes won't be changed.
Add the following code to the script.
'****Random cust. order numbers and colors*************** Order$ = " " Color$ = " " Randomize Number = Random(5000,9999) Order$ = Number If(Number Mod 3) = 0 Then Color$ = "RED" ElseIf(Number Mod 3) = 1 Then Color$ = "GREEN" Else Color$ = "BLUE" End If '***End Random generation*************************** |
Add two specific values to the .modify method
Region.Item(j).SetAttr A1$, Order$
Region.Item(j).SetAttr A2$, Color$
Compile your script.
Close the Edit Script window.
Close the Properties - Object dialog box.