Pick up a specified text on several card?

Magnus von Brömsen webmaster at studioalice.se
Sun May 19 05:26:00 EDT 2002


Hi

I want to collect some pecified lines of text from a field on a unknown 
number of cards. And put that text in another field on another card.

So, with this script I manage to get all the text from all the cards:

on mouseUp
   repeat for the number of cards
     put field "sessions" after tempText
     go to next card
     if cardIDs is 1040 then exit repeat --this is the card there all 
text is placed
   end repeat
   put tempText into field "result"
end mouseUp

If I want to specified which lines to get something goes wrong:

on mouseUp
   put field "date" into thisDate --here I specifies which text to look 
for
   repeat for the number of cards
     put field "sessions" into tempText
     repeat for each line xLine in tempText
       find thisDate
       put the value of foundline() & return after thisLine
     end repeat
     go to next card
     if cardIDs is 1040 then exit repeat
   end repeat
     go to card "search"
     put thisLine into field "result"
end mouseUp

The error is that the founded lines is repeated several times in the 
field "result" ?? (Maybe something with the "repeat for the number of 
cards" because the same text is repeated sometimes twice and sometimes 
three times.) But I can't figure out the pattern.

Can anyone give me a hint where to look...

magnus


--------------------------------------------------------------------------------
"Jag lägger mig tidigt – för att snabbt få gå till jobbet. Igen."
--------------------------------------------------------------------------------
Studio Alice
Magnus von Brömsen
0702-212 495
0322-633 833
www.studioalice.se




More information about the use-livecode mailing list