Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th April 2006, 18:07   #1  |  Link
terrense
Registered User
 
Join Date: Mar 2006
Posts: 9
if condition then action

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~~
terrense is offline   Reply With Quote
Old 16th April 2006, 19:07   #2  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
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 on his site.
foxyshadis is offline   Reply With Quote
Old 18th April 2006, 18:10   #3  |  Link
terrense
Registered User
 
Join Date: Mar 2006
Posts: 9
i found the answer on stickboy's homepage.

that's easy:

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

eval(myVal)
terrense is offline   Reply With Quote
Old 19th April 2006, 07:50   #4  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
Sure, but for your example, you really should do what foxyshadis said.
stickboy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.