Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # http://avisynth.org/mediawiki/HDColorBars
- Function StrReplace(string base, string sought, string rep)
- {
- pos = FindStr(base, sought)
- return (sought == "") || (pos == 0) \
- ? base \
- : StrReplace( \
- LeftStr(base, pos - 1) + rep + \
- MidStr(base, pos + StrLen(sought)), \
- sought, rep)
- }
- # http://forum.doom9.org/showthread.php?t=102929
- function ForNext(var_string, from_indx, to_indx, by_value, loop_string, format_string)
- {
- result = ""
- LineBreak = """
- """
- from_indx <= to_indx ? Eval( "result = result + LineBreak + StrReplace(loop_string, var_string, String(from_indx, format_string))") : NOP
- (from_indx+by_value) <= to_indx ? Eval( "result = result + ForNext(var_string, (from_indx+by_value), to_indx, by_value, loop_string, format_string)") : NOP
- return result
- }
- # this example splices the following clips:
- # cv3.avi
- # cv3_part002.avi
- # cv3_part003.avi
- # cv3_part004.avi
- a = AviSource ("cv3.avi")
- Eval(ForNext ("${i}", 2, 4, 1, """a = a + AviSource ("cv3_part${i}.avi")""", "%03.0f"))
- a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement