Page 1 of 1

repeat loop

Posted: Mon Jul 13, 2009 6:05 am
by Glenn Boyce
The code below works but I actually want to substitute the m+2 and the m+3 with 2m+1 and 2m+2 and it won't accept it. I've tried putting brackets around it but doesn't seem to help. I have 7 fields that have five lines each that I want to copy data into.
on mouseUp
set itemdelimiter to tab
repeat with n = 1 to tlineNo
repeat with m = 1 to 5
put item m+2 of line n of fld "Blends" && item m+3 of line n of fld "Blends" into line m of fld ("layer" & n)
end repeat
end repeat
end mouseUp

Posted: Mon Jul 13, 2009 7:59 am
by Mark
Dear Glenn,

if you enter "operator" in the search field of Rev's dictionary, you get a list, which starts with a lot of funny symbols, followed by a relatively short list of words. It would be very useful if you read the documentation for all items in this list, particularly the one for "*" ;-)

Best,

Mark

Posted: Mon Jul 13, 2009 9:54 pm
by Glenn Boyce
Hi Mark.

You know I looked at that line of code and thought there's going to be a really simple solution to this and I can't see it even though it's staring me in the face!! Duh! I didin't need to look up the operators. Works fine now. I'd have to say it was pretty late in the day here - well thats my excuse anyway!

Posted: Mon Jul 13, 2009 10:04 pm
by Mark
Hi Glenn, that's what the ;-) was for. I thought you'd figure it out.

Mark