Call my code clunky, clumsy and slow, and that won't really fuss me:

BUT what does fuss me is why this produces NO results when it analyses a text imported from an RTF file, BUT does work when the text
is either manually edited or imported from a text file.

on mouseUp
   put empty into fld "COOKED"
   put 1 into KTEKST
   put 1 into KCOOK
   repeat until line KTEKST of fld "TEKST" contains "finalSolution666"
      put line KTEKST of fld "TEKST" into fld "LYNE"
      put 1 into KWERBS
      repeat until line KWERBS of fld "WERBS" contains "finalSolution666"
         put "was " & line KWERBS of fld "WERBS" into fld "FRAZE"
         if fld "LYNE" contains fld "FRAZE" then
            put fld "LYNE" into line KCOOK of fld "COOKED"
            add 1 to KCOOK
            end if
         add 1 to KWERBS
      end repeat
      add 1 to KTEKST
   end repeat
end mouseUp

This is a big Pain-in-the-bum as texts imported from Text files do NOT generally come into LC textFields with lineBreaks.

Richmond.


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to