Read a text file

Andre Garzia soapdog at mac.com
Mon Jan 17 17:26:03 EST 2005


On Jan 17, 2005, at 8:21 PM, Thomas Gutzmann wrote:

>> 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
>

beware that you'll have quoted strings this way, you might want to 
remove the quotes prior to inserting them in the field...

andre


> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-- 
Andre Alves Garzia ð 2004 ð BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list