Log in

View Full Version : if condition then action


terrense
16th April 2006, 18:07
hi everybody here, i need help on expressing a same meaning in avisynth as in VB like this:

if clip.framecount() < 18000 and clip.framecount() > 9000 then
clip.overlay(......)
clip.textsub(......)
end if

how do i write my script in .avs?

thanx~~

foxyshadis
16th April 2006, 19:07
special = clip.crazyfilters()
trim(0,8999)++special.trim(9000,17999)++trim(18000,0)

That's fine for one, but for more complicated replacements stickboy has a lot of really cool editing functions (http://www.avisynth.org/stickboy/) on his site.

terrense
18th April 2006, 18:10
i found the answer on stickboy's homepage.

that's easy:

myVal = condition ?
\ "a = 1
b = 2" :
\ "a = 3
b = 4"

eval(myVal)

stickboy
19th April 2006, 07:50
Sure, but for your example, you really should do what foxyshadis said.