『第 17 楼』:
使用 LLM 解释/回答一下
把你那段作为字符串有条件的……
一行最多255个然后用 _ 分行~分行貌似也有限制。
你要转一段文字作为字符串。
ScriptInfo = "[Script Info]" & vbcrlf & ";本字幕为英语在上,汉语在下,视频内部有时会出现英语." _
& vbcrlf & "ScriptType: v4.00" & vbcrlf & "Collisions: Normal" & vbcrlf _
& "PlayResX: 384" & vbcrlf & "PlayResY: 288" & vbcrlf & "Timer: 100.0000"
msgbox ScriptInfo
然后再定义V4Styles,甚至里面的样式,比如:
;汉字样式
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Default,Arial,17,&Hffffff,&H00ffff,&H000000,&H000000,-1,0,1,2,0,2,20,20,21,0,1
也可以单独定义成几块……
用的时候
ScriptInfo & V4Styles合并就可以了。。。。替换每行字符串中的"为""然后前后都加上引号.然后将回车替换成字符串 " & vbCrLf & "
字符串长度你自己限制下吧
Let's see. The original text has some Chinese and then code examples. Let's translate the relevant parts.
The text translates to:
Put your那段 as a string conditionally...
Up to 255 characters per line and then split with _ for lines. There seems to be a limit for splitting lines too.
You need to convert a paragraph of text into a string.
ScriptInfo = "" & vbcrlf & ";This subtitle is English on top, Chinese at the bottom. English may appear inside the video." _
& vbcrlf & "ScriptType: v4.00" & vbcrlf & "Collisions: Normal" & vbcrlf _
& "PlayResX: 384" & vbcrlf & "PlayResY: 288" & vbcrlf & "Timer: 100.0000"
msgbox ScriptInfo
Then define V4Styles, even the styles inside, like:
;Chinese style
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Default,Arial,17,&Hffffff,&H00ffff,&H000000,&H000000,-1,0,1,2,0,2,20,20,21,0,1
It can also be defined separately in several parts...
When using it
ScriptInfo & V4Styles combined is okay... Replace "in each line of the string with " and add quotes before and after. Then replace carriage returns with the string " & vbCrLf & "
You can limit the string length yourself
|