tv_readtextfile how?

A forum dedicated to George scripting questions
Post Reply
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

tv_readtextfile how?

Post by Mads Juul »

How does it wotk?
I want to read to content of the file "C:/test.edl"

should this work?

tv_readtextfile "C:/test.edl"

And is the result the content of the text file?

-mads
User avatar
Hervé
Site Admin
Posts: 3490
Joined: 08 Feb 2006, 17:00
Location: Metz France
Contact:

Re: tv_readtextfile how?

Post by Hervé »

tv_readtextfile linenumber filename
return linenumber and line readed or EOF if the linenumber is after the end of the file

example:

Code: Select all

text = ""
loop = 1
line = 0
while ( loop==1 )
    tv_readtextfile  line "c:/windows/system.ini"
    parse result eof string
    if ( CMP( eof, "EOF"  ) == 1)
         loop = 0
   else
          text = text""string
    end
   line = line + 1
end
tv_warn text
Hervé ADAM, TVPaint Team
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: tv_readtextfile how?

Post by Mads Juul »

Ahh thank you Herve
in the Changes.txt in the SDk it says

Code: Select all

tv_readtextfile FileNumber FOLDER_Name
it is a little confusing ;-) it should be changed to

Code: Select all

tv_readtextfile linenumber filename
-Mads
Post Reply