PDA

View Full Version : Automating Avisynth Script File Editing


BRN
1st August 2002, 03:38
I ran across the freeware scripting utility AutoIt, by Jonathan Bennett. It's been a great way for me to automate editing of my AVS file during encodes. It can be downloaded at: http://www.hiddensoft.com/AutoIt/ You can completely rewrite your AVS file when the "Edit Avisynth Script File" window comes up, Save it, click OK and continue on all from the script.

Here's the script I use now. Semicolons are comments and, as usual, use your own directory paths:

----------------Begin Script------------------------------

;Basic AVS Script. Use double slashes ( \\ ) in all directory paths.

;Wait for Edit Avisynth Script File window to open, give it the focus.
;Highlight existing AVS file text and delete it.

WinWait, Edit Avisynth Script File
WinActivate, Edit Avisynth Script File
LeftClickDrag, 6,32,6,94
Send, {DEL}

;Write new AVS file text to Edit Avisynth Script File window.

Send, LoadPlugin("C:\\DVD Apps\\DVD2SVCD\\MPEG2Dec\\MPEG2DEC.DLL")#{ENTER}
Send, LoadPlugin("C:\\DVD Apps\\AVISynth\\TemporalSoften2.dll")#{ENTER}
Send, LoadPlugin("C:\\DVD Apps\\DVD2SVCD\\Avisynth\\UnFilter.dll")#{ENTER}
Send, mpeg2source("D:\\gladiator\\DVD2AVI_PROJECT_FILE.d2v")#{ENTER}
Send, BicubicResize(480,360,0.00,0.60)#{ENTER}
Send, AddBorders(0,60,0,60)#{ENTER}
Send, TemporalSoften2(3,6,8)#{ENTER}
Send, Unfilter(35,35)#{ENTER}

;Hit the Save button to save the file and hit OK to continue.

Send, {TAB 3}#{ENTER}#{TAB 2}#{ENTER}

----------------End Script------------------------

You can modify this script to include the dvd2svcdbatch.bat file to completely automate the process. Once you have your script ready to go it can be launched through the Windows Task Scheduler. AutoIt also has the capability to edit .ini formatted files so you can change .d2s, .ecl, or .ini files from a script as well.


OFF TOPIC
Moderators - I've used this utility to start and stop video captures with VirtualDub with pretty good success as well so it might be a good idea to post this to that forum as well.