Page 1 of 1

capital letter

Posted: Thu Mar 17, 2011 1:39 am
by Preston Shea
How do I go through field fA copying only those lines that begin with a capital letter to field fB?

Re: capital letter

Posted: Thu Mar 17, 2011 1:55 am
by bn
Hi Preston,

Code: Select all

on mouseUp
   put field "fA" into tData
   repeat for each line aLine in tData
      put charToNum(char 1 of aLine) into tCapital
      if tCapital > 64 and tCapital < 91 then put aLIne & cr after tCollect
   end repeat
   delete last char of tCollect
   put tCollect into field "fB"
end mouseUp
works for English, it is not taking into account accented or umlaut characters. Works only on real lines, not apparent lines if they are the result of a line wrap.
ASCII 65 = capital A ASCII 90 = capital Z
Kind regards

Bernd