Thread: Avisynth+
View Single Post
Old 29th August 2019, 07:55   #4861  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
Another bug?

ConditionalReader:

Code:
TYPE string
DEFAULT this_is_the_default

1 test
2 string
5 
8 testing
This throws an error that it doesn't understand line 6 (the one with frame 5). Note that there's just one space after 5. The space is there to separate the frame number from the value. In this case I want the value to be an empty string.
Note that setting the default string to empty *does* in fact work (with just the one space after "DEFAULT"), but the exact same thing *does not* work for the individual frames.

edit:
This example script goes with the above "test.txt" text file, for testing purposes:
Code:
ColorBars
Trim(0,500)
ScriptClip("Subtitle(String(myvar))")
ConditionalReader("test.txt", "myvar", false)

Last edited by ajp_anton; 29th August 2019 at 07:58.
ajp_anton is offline