Auto-remove blank lines in a list field

yves COPPE yvescoppe at skynet.be
Sun Apr 7 14:27:00 EDT 2002


>Hello all,
>
>I have a list field and I am trying to write a script
>that upon "closeField" (or something appropriate),
>will automatically check each line in the field and
>remove/delete any blank lines in the list field; I
>have tried this a ton of different ways using
>variations of the repeat command, but have not been
>able to make it work.
>
>Thanks
>
>Steve


You must count down :

put the number of lines of fld "yourfldname" into totLines
repeat with x = totLines down to 1
    if line x of fld "yourfldname" is empty then
       delete line x of fld "yourfldname"
    end if
end repeat

hope this help.
-- 
Greetings.

Yves COPPE

Email : yvescoppe at skynet.be



More information about the use-livecode mailing list