Thread: Avisynth+
View Single Post
Old 5th December 2019, 19:15   #4987  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Suppose I have two scripts, one of which imports the other. The first script gets a source:

Code:
source = AviSource("myfile.avi")
The second file returns a clip based on this source, but I'd also like the second file to be openable stand by itself. Is there a way to call AviSource and assign the the result to source at the top of the second file, but only if source has not already been defined? I tried VarExist like this:

Code:
source = VarExist(source) ? source : avisource("myfile.avi")
But I just get errors.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline