Read a text file

Thomas Gutzmann thomas.gutzmann at gutzmann.com
Mon Jan 17 17:21:37 EST 2005


> How do I read a text file then insert the information in a label?
>
> Text file format will be:
>
> "Name","ID","Email at Address.net"
>
> There will be 3 labels "Name", "ID", and "Email address"

set the itemDelimiter to "," -- this is the default
put URL "file:Stories/Westwind" into vArr
repeat with i = 1 to the number of lines in vArr
   put item 1 of line i of vArr into vName
   put item 2 of line i of vArr into vID
   put item 3 of line i of vArr into vEMail
end repeat



More information about the Use-livecode mailing list