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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th May 2014, 23:32   #1  |  Link
lisztfr9
Registered User
 
Join Date: Apr 2010
Posts: 175
Defined array for variable ?

I would like to assign different values to variable T, inside a clip :

Quote:
function toogle(float T) {

return (T<10) ? 30 : (T>20) ? 100 : 15
}

S = ScriptClip(S, "Subtitle(String(toogle(current_frame)))")
This works well, but seems limited to a few changes, isn't there a easier way to proceed ? A dedicated one ? i'm certainly missing something obvious.

Thanks a lot,

L
lisztfr9 is offline   Reply With Quote
Old 27th May 2014, 23:47   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I assume that your final usage would not be to display toogle() via subtitle, the guys could possibly give better
assistance if they knew what you want to do with the result.
Anyway, take a peek at ConditionalReader().

EDIT: Here: http://avisynth.nl/index.php/ConditionalReader
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 27th May 2014 at 23:50.
StainlessS is offline   Reply With Quote
Old 28th May 2014, 08:47   #3  |  Link
lisztfr9
Registered User
 
Join Date: Apr 2010
Posts: 175
Thanks StainlessS, also GScript comes in mind :

if ( condition ) {
statements
}
else if ( condition ) {
statements
}
else if (...) { ... }
...
else {
statements
}

Yes ConditionalReader i will give it a try

L
lisztfr9 is offline   Reply With Quote
Reply


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 05:31.


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