Do filters have access to the script path and name? » Side Dishes » Forum
Forum
  Поиск   Users   Registration   Entrance
Today: 24.06.2025 - 10:29:30
Pages:  1  

Do filters have access to the script path and name?

Advertising

CROWD links from forums - 0,9 USD


MessageAuthor

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.

---------------------

MD326

main-users




Statistics:
Messages: 807
Registration: 06.24.2003
23.02.23 - 14:12:11
Message # 1
RE: Do filters have access to the script path and name?

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.

---------------------

DakkarM3

main-users




Statistics:
Messages: 293
Registration: 08.25.2002
23.02.23 - 14:18:14
Message # 2
RE: Do filters have access to the script path and name?

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 ?

---------------------

eurospeed

main-users




Statistics:
Messages: 379
Registration: 02.26.2001
23.02.23 - 14:23:59
Message # 3
RE: Do filters have access to the script path and name?

@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. :)

---------------------

air

main-users




Statistics:
Messages: 101
Registration: 08.27.2002
23.02.23 - 14:30:07
Message # 4
RE: Do filters have access to the script path and name?

@neuron2 What wild :devil: ideas go up to around your head? :D

---------------------

bigrhett

main-users




Statistics:
Messages: 124
Registration: 12.10.2003
23.02.23 - 14:34:38
Message # 5
RE: Do filters have access to the script path and name?
v2.99.alpha.preview.7 : Previous topicNext topic: Parts for Volvo 480
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants