best way to read and write variables?

Ken Ray kray at sonsothunder.com
Mon Dec 10 12:00:01 EST 2001


Niklas,

You could do the same thing as you do in Authorware, but using a "do"
statement, as in:

-- Assume a comma- and return-delimited list of <variable>,<value> pairs
on mouseUp
  put url "file:c:\vars.txt" into varFile
  repeat for each line l in varFile
    do "put " & quote & (item 2 of l) & quote & " into " & (item 1 of l)
  end repeat
end mouseUp

I think most people haven't responded because they probably don't normally
keep variable data in external files. (Just a guess...)

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Niklas Almesjö" <niklas_almesjo at yahoo.com>
To: <use-revolution at lists.runrev.com>
Sent: Monday, December 10, 2001 7:37 AM
Subject: Re: best way to read and write variables?


> Come on people.. give me a hand here. this must be a
> common task, no?
> - What is the simplest way to store variables outside
> of Rev?
>
>
>
>
> Message: 19
> Date: Fri, 7 Dec 2001 06:47:40 -0800 (PST)
> From: Niklas "Almesjö" <niklas_almesjo at yahoo.com>
> Subject: best way to read and write variables?
> To: use-revolution at lists.runrev.com
> Reply-To: use-revolution at lists.runrev.com
>
> What is the best way to write and read variables?
> When using Authorware there was a pretty convinient
> way to do it with property lists. Property lists
> looked something like this: "width":50, "height": 30
> then you could just write the list to a textfile, read
> it in and do a List(theText) and you had the list
> again. Anything similar (or even better) in Rev?
> thanks,
> /Niklas
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list