View Full Version : AviSynth scripting: cycles?
redfordxx
17th May 2006, 11:36
In my script now I would make a use of cycles.
Something like For...Next, Do...Loop ...
I didn't notice it anywhere documented but I want to check wheter I didn't miss it somewhere, coz it would help a lot in a script I am working on.
So, are they or are they not?
foxyshadis
17th May 2006, 12:14
http://forum.doom9.org/showthread.php?t=106880
Depending on the presice task, it might be easier to amend it to avisynth's functional coding model, but if you already have a procedural loop algorithm worked out, great.
stickboy
17th May 2006, 19:20
As I've said before (http://forum.doom9.org/showthread.php?p=814183#post814183):
Exactly why do you want to do this? A lot of people often think they want loops like in imperative programming languages but haven't really wrapped their minds around AviSynth's more functional nature. There's usually a better way.
But anyhow, the typical on-script-load way is to write a recursive function.
redfordxx
17th May 2006, 21:54
Thanks to both of you guys.
Exactly why do you want to do this?Example --- my first try:Dim("DctParams",8,0)
For2("i=7","i>="+String(quant),"i=i-1",
\"""
DctParams.Set(i,1)
""")
orig.DCTFilter(DctParams7,DctParams6,DctParams5,DctParams4,DctParams3,DctParams2,DctParams1,DctParams0)well, I am little unsure about nesting and number of quotation marks, but I figured outBut anyhow, the typical on-script-load way is to write a recursive function.True, thanks for reminding... although the arrays here are interesting perk.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.