View Full Version : Do filters have access to the script path and name?
Guest
26th September 2002, 04:15
I reckon Dividee will be the first to answer this. :)
I am implementing a feature that allows manual override of Telecide/Decimate decisions (you know, the mouth thing :)). So I need to look for a file that has the name of the script but with .ovr instead of .avs. Does a filter have access to the path and name of the invoked script file? I'd like to avoid specifying it as a parameter, or using a fixed file name, if possible.
sh0dan
26th September 2002, 08:47
I'm pretty sure, that the script-directory is "current" directory, when Avisynth runs.
For example, you can use AviSource("anim.avi") if "anim.avi" is in the same directory as your avs file.
dividee
26th September 2002, 22:27
I wasn't the first to answer (currently I only have the time to check the forum once a day :().
Yes, the path is the current directory, but it doesn't give you the file name. I don't think there is a way to do it now, but I can easily add this to avisynth, in a $ScriptName$ variable for instance (like the $PluginDir$ variable). But you should be prepared to catch the exception if the variable doesn't exist when, for instance, a filtergraph is created programmaticaly and no script is used.
Agreed ?
Guest
26th September 2002, 23:02
@sh0dan
Thank you. That is what I have done now.
@dividee
Thank you for the response. It turns out that the path is enough, because I am allowing the user to specify the file name. So I don't really have a need for that addition. Do more important things. :)
Kyo
27th September 2002, 05:48
@neuron2
What wild :devil: ideas go up to around your head? :D
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.