Log in

View Full Version : Getting clipname into AVS script


dosdan
28th November 2016, 22:06
I want to drag and-and-drop individual clips on to a batch icon. From there I want to pass the clipname into an AVS script and open the script in Vdub. Is it possible to use an EV to pass the clipname from the batch file into the script?

I don't want to use AVisynth Batch Scripter as it requires scanning for files first. I just want to be able to use drag-and-drop to process lots of small clips as I create them, not in one big batch.

Dan.

raffriff42
28th November 2016, 23:26
Accessing the environment can be done with RT_Stats (http://forum.doom9.org/showthread.php?t=165479) by StainlessS LoadPlugin(p + "RT_Stats\RT_Stats26.dll")
DirectShowSource(RT_GetSystemEnv("VIDEO"))
...



I generally use a batch file placed in my Windows Send To folder (https://www.google.com/search?q=Windows+Send+To+folder) to generate a basic script for any video. Something like this:@echo off
set OUTFILE="%~dpn1-auto.avs"
@echo Import("myfilters.avsi") > %OUTFILE%
@echo DirectShowSource("%~dpnx1") >> %OUTFILE%
@echo Import("mymain.avsi") >> %OUTFILE%

Of course, I don't actually use DirectShowSource! This is just an example.