SRL Archive - FAQ

Writing from file


I am new

2011-11-15 18:34:34

Let's say that I have 3 lines in text file

line1
line2
line3

How I can make my script select one of the lines from the text file? I have been trying to figure this out for few hours now. So far I can make my script write everything from the file.

I hope that you get my point and help will be appreciated! ;)

Also I hope that this is in right section, It's quite late.

Nava2

2011-11-15 19:56:39

http://docs.villavu.com/simba/scriptref/files.html#readfilestring

:)

I am new

2011-11-16 08:00:18

Thanks, didn't know that there was reference (Y).

I guess what I am looking for is done with SetFileCharPointer but I don't really see how it functions, I tried to google and search in villavu, but couldn't find any examples.

bevardis

2011-11-16 12:44:14

With python, it was file.readline[1] iirc. So much more complicated with pascal.

I am new

2011-11-16 13:52:18

From: bevardis
With python, it was file.readline[1] iirc. So much more complicated with pascal.


Yeah, I solved my problem with changing method. Instead of reading from textfile I use TStringList in my actual script.

Anyway thanks to you who bothered to reply!:bart: