Repeat variable name changing
Jim Hamlyn
jim at jimhamlyn.co.uk
Sat Mar 8 09:50:35 EST 2008
Hi again,
I need the repeat loop to effectively instantiate a new variable each time
it loops with a name I can reference through the same script.
Or
I need the script to create a variable for each line in the field which I
can reference from the same script.
Does this make any sense?
Jim H
From: -= JB =- <sundown at pacifier.com>
Reply-To: How to use Revolution <use-revolution at lists.runrev.com>
Date: Sat, 8 Mar 2008 06:22:47 -0800
To: How to use Revolution <use-revolution at lists.runrev.com>
Subject: Re: Repeat variable name changing
I may not totally understand what you are trying to
do but it sounds like you are looking for a repeat
structure that will change fTime to 1,2,3 etc.
repeat with fTime = 1 to number of lines in fld whatever
put item 5 of line fTime into whereyouwant
end repeat
A repeat structure similar to the above would repeat
for 10 time if the field had 10 lines and then it would
automatically add 1 to fTime on each repeat & quit
after it executed the 10th time.
If it does not work properly I may have written it a
little wrong because I am use to hypercard but just
ask if it doesn't.
-=>JB<=-
On Mar 8, 2008, at 5:52 AM, Jim Hamlyn wrote:
> Thanks for the replies so far wow!
>
> Ok it looks like I need to be a little more specific.
>
> I¹m making a meeting scheduler. The idea is to have a field into
> which I can
> paste return separated list of names. I have a field with a start
> time and a
> field with a meeting length ³Add². At the moment I¹m doing it the
> long way
> round:
>
> on mouseUp
> put fld "StartTime" into tTime1
> convert tTime1 to dateItems
> add fld "Add" to item 5 of tTime1
> put tTime1 into tTime2
> add fld "Add" to item 5 of tTime2
> put tTime2 into tTime3
> add fld "Add" to item 5 of tTime3
> convert tTime1 to time
> put tTime & ":" & Tab before line 1 of fld "myField"
> etc
>
> Jim H
>
>
>
More information about the use-livecode
mailing list