Hi Mark, That would be:
repeat with x = 1 to the number of buttons of cd y put the hilite of btn x into myButtonArray[x] end repeat If you want to have the hilites as text, you might want to use a normal variable instead of an array: put the hilite of btn x & cr after myButtonList Make sure to read everything about repeat loops in the LiveCode dictionary! -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Download the Installer Maker Plugin 1.7 for LiveCode here http://qery.us/za On 22 feb 2012, at 17:49, Mark Smith wrote: > Hi, I have 38 buttons on a form that I need to copy their hilite value to a > temporary variable. Is it possible in LC to do something like > > for x = 1 to the number of buttons on card y > put the hilite of btn"x" into tButtonx > end > > instead of writing out manually, 38 times: > > put the hilite of btn"fhHypertension" into tButton4 > put the hilite of btn"fhDiabetes" into tButton5 > etc > > Thanks > > -- Mark > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode