Pick up a specified text on several card?

John Cuccio jcuccio at pacbell.net
Tue May 21 09:23:31 EDT 2002


>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

-----------------

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
      if matchtext(xline,thisdate) = true then
          put xline & return after thisline
      end if
     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

Since you are checking each line in your repeat loop then a matchtext does
better. Foundline is better for founding items on multi card in a stack.

Hope this helps.




More information about the use-livecode mailing list