Is there a way to shorten this script? (100 graphics and 200 lines of text)

William de Smet williamdesmet at gmail.com
Tue May 8 14:21:17 EDT 2012


Hi there,

Can anyone help me shorten this script?
Eventually there will be 100 graphics (d1 to d100) and 200 lines of
text in field "in"
Each graphic uses two lines of follow up numbers (correct English?) of fld "in"
--------
set the backgroundcolor of grc "d1" to the text of line 1 of fld "in"
   set the foregroundcolor of grc "d1" to the text of line 2 of fld "in"
   --
   set the backgroundcolor of grc "d2" to the text of line 3 of fld "in"
   set the foregroundcolor of grc "d2" to the text of line 4 of fld "in"
   --
  set the backgroundcolor of grc "d3" to the text of line 5 of fld "in"
  set the foregroundcolor of grc "d3" to the text of line 6 of fld "in"
  --
  set the backgroundcolor of grc "d4" to the text of line 7 of fld "in"
  set the foregroundcolor of grc "d4" to the text of line 8 of fld "in"
  --
  set the backgroundcolor of grc "d5" to the text of line 9 of fld "in"
  set the foregroundcolor of grc "d5" to the text of line 10 of fld "in"
  --

Thanks!

Greetings,

William




More information about the use-livecode mailing list