- -
where I hit the ENTER key every line before the 'r', and wonder why this does NOT work:
Code: Select all
on mouseUp
if line 1 of fld "ff" contains cr then
delete line 1 of fld "ff"
end if
end mouseUp
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on mouseUp
if line 1 of fld "ff" contains cr then
delete line 1 of fld "ff"
end if
end mouseUp
Code: Select all
on mouseUp
if line 1 of fld "ff" contains linefeed then
delete line 1 of fld "ff"
end if
end mouseUp
Code: Select all
filter field "ff" without empty
Code: Select all
put line 1 of field "ff" contains cr
Code: Select all
the number of chars of line 3 of fld 1
Code: Select all
if line 5 of fld 1 = cr then beep 2
if line 5 of fld 1 contains cr then beep 2
Well, it was worth a try...
It's counted when dealing with strings but not when working with text chunks. It has multiple personalities.
Code: Select all
on mouseUp
put the number of words in fld "ff" into WN
put the word 1 to WN of fld "ff" into EFF
put empty into fld "ff"
put EFF into fld "ff"
select after fld "ff"
end mouseUp
Code: Select all
on mouseUp
put trimCRs(field "ff") into field "ff"
end mouseUp
function trimCRs pText
repeat while line 1 of pText is empty
delete line 1 of pText
end repeat
repeat while the last line of pText is empty
delete the last line of pText
end repeat
return pText
end trimCRs
Code: Select all
put word 1 to -1 of fld "ff" into fld "ff"