home *** CD-ROM | disk | FTP | other *** search
- on tidyuptext fieldName
- global filetextlist, foundline
- set filetextlist to list()
- repeat with i = 1 to the number of lines in field fieldName
- set foundline to line i of field fieldName
- if charToNum(char 1 of foundline) = 10 then
- set foundline to char 2 to the number of chars in foundline of foundline
- end if
- if charToNum(char the number of chars in foundline of foundline) = 13 then
- set foundline to char 1 to the number of chars in foundline - 1 of foundline
- end if
- append(filetextlist, foundline)
- end repeat
- set tempfieldstring to EMPTY
- put EMPTY into field fieldName
- repeat with i = 1 to count(filetextlist)
- if i < count(filetextlist) then
- put getAt(filetextlist, i) & RETURN after tempfieldstring
- next repeat
- end if
- put getAt(filetextlist, i) after tempfieldstring
- end repeat
- put tempfieldstring into field fieldName
- set tempfieldstring to EMPTY
- end
-