Log in

View Full Version : Cannot make a subtitle with a line break


lisztfr9
20th October 2012, 17:31
Hi,

it seems that i miss something obvious..

I cannot make a subtitle with a line break :

newline = "Chr(13) + Chr(10)"
script = "Subtitle(String(AverageLuma))" + newline + """subtitle("frame = " + string(current_frame))"""

Scriptclip(last, script)


http://avisynth.org/mediawiki/The_script_execution_model/Scope_and_lifetime_of_variables#A_variables_scope_and_lifetime_example

script = "th1 = " + String(th1) + Chr(13) + Chr(10) + \
"th2 = " + String(th2)

According to this, Scriptclip could evaluate the carriage return and line feed, and maybe it does but it's not printed ?

It is for debugging purpose, to have more variables on screen.

Thanks, L

lisztfr9
20th October 2012, 18:21
Sorry, i should have RTFM. it all depends on x, y coordinates.

Gavino
20th October 2012, 18:58
Sorry, i should have RTFM. it all depends on x, y coordinates.
As you've discovered, you can get multi-line titles by calling Subtitle several times with different values for 'y'.

You can also get a newline in a single call to Subtitle by including the text "\n" and setting the lsp parameter, eg

script = """Subtitle(String(AverageLuma) + "\nframe = " + string(current_frame), lsp=0)"""

Scriptclip(last, script)

StainlessS
21st October 2012, 18:08
Thanks for jogging the memory there Gavino, I did about 5 or 6 Subtitles() for Showchannels()
Global Vars demo, guess I'll have to change it.


EDIT:
@lisztfr9, See RT_Debug() in RT_Stats plug, great for realtime debugging and can save log file in DebugView.