Get values from textfile.

Hi,

I’m have trouble getting my script to pick up data from a text-file.

What I want is for example to give the variable “realname” the text that’s on the first line in the text-file, then give the variable “age” the text that’s on the second line in the text-file and so on.

But the only thing I manage to do is read from the same line in the file not from different lines. How do I do this the easiest way?

/Jakob

For example, these are the contents of “test.txt” in my desktop:

And this is my code:

set {firstName, lastName, oneFilm} to paragraphs of (read alias "path:to:desktop:test.txt")

Ahh it’s perfect! Thanx! =)