Script Improvement Advice
Paul Charlesworth
pcharles at chartermi.net
Thu Jun 5 07:00:01 EDT 2003
Thank you for all the suggestions. I am amazed that there are so many
different ways to achieve the same result.
Paul
On Thursday, Jun 5, 2003, at 06:32 America/Detroit, Malte Brill wrote:
> Hi Paul,
>
>> What I would like to know is the most elegant beginners way to script
>> the placement of properties into each field on pressing an element
>> button. At this point I am adding the following script to each button:
>
> Here is my two euro-cents.
>
> I would start naming the fields you want to put your data into with a
> static
> part and a number like:
>
> out1
> out2
> out3
> ...
>
> Create another field that holds your data, called "data"
> each record is on a line, delimited with a comma like:
>
> Hydrogen,1,1.008,...
>
> put the following script in your buttons:
>
> on mouseup
> put 1 into theLine
> --or whatever line of your "data" field is corresponding
> repeat with i=1 to the number of items of line theLine fld "data"
> put item i of line theLine fld "data" into fld ("out"&i)
> end repeat
> end mouseup
>
> Hope that helps,
>
> Malte
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list