tv_readtextfile how?

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

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
Mads Juul
Storyboard Artist
blog: http://mjstoryboard.blogspot.dk/
Mail: mjstoryboard@gmail .com

Windows 10, 64 bit i7-4790 CPU 4.00 Hz,32 GB RAM, With TVP Animation 11 Pro (11.0.2-64bits)
2 Monitors 1920X1080 pixels + 1 Wacom Cintiq 21UX 2
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
Location: Viborg,Denmark
Contact:

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
Mads Juul
Storyboard Artist
blog: http://mjstoryboard.blogspot.dk/
Mail: mjstoryboard@gmail .com

Windows 10, 64 bit i7-4790 CPU 4.00 Hz,32 GB RAM, With TVP Animation 11 Pro (11.0.2-64bits)
2 Monitors 1920X1080 pixels + 1 Wacom Cintiq 21UX 2
Post Reply