QLab使用脚本更改文本Cue参数
在使用QLab做剧场演出时,经常会用到一些字幕文本Cue,此文章示范在QLab中使用脚本修改文本Cue的颜色及其它参数。
脚本示范:
tell application id "com.figure53.QLab.4" to tell front workspace set theCues to cues whose q type is "text" set theFormat to {rgbaColor:{red:1, green:0.5, blue:1, alpha:1}} repeat with eachcue in theCues set text format of eachcue to theFormat end repeat end tell
当然可以在脚本里直接指定Cue编号:
tell application id "com.figure53.QLab.4" to tell front workspace set theCue to cue "1" set theFormat to {rgbaColor:{red:0.3, green:1, blue:1, alpha:1}} set text format of theCue to theFormat end tell
为了完整起见,将TheFormat设置为文本格式记录,该记录是定义文本样式的所有属性的列表。因此,如果您想包括一个字体并将其设为粗体,白色和72磅,则可以:
set theFormat to {fontFamily:"Courier", fontStyle:"Bold", fontSize:72, rgbaColor:{red:1, green:1, blue:1, alpha:1}}
你还可以更改以下所有属性:
fontFamily (text) : 此格式的字体系列。(例如“ Helvetica”,“ Courier New”) fontStyle (text) : 此格式的字体样式。如,“常规= Regular”,“倾斜= Light Oblique ” fontName (text) : 此格式的字体名称。 (如. "CourierNewPS-BoldItalicMT") fontSize (real) : 此格式的字体大小。 lineSpacing (real) : 此格式的行距。 rgbaColor (rgba color record) : RGBA颜色记录,表示此格式的文本颜色的红色,绿色,蓝色和alpha分量的百分比值。 rgbaBackgroundColor (rgba color record) : RGBA颜色记录,表示此格式的背景颜色的红色,绿色,蓝色和alpha分量的百分比值。 strikethroughStyle (text) : 删除线格式的风格。可能的值为“ none”,“ single”和“ double”。 strikethroughRgbaColor (rgba color record) : RGBA颜色记录,表示此格式的删除线颜色的红色,绿色,蓝色和alpha分量的百分比值。 underlineStyle (text) : 此格式的下划线样式。可能的值为“ none”,“ single”和“ double”。 underlineRgbaColor (rgba color record) : RGBA颜色记录,表示此格式下划线颜色的红色,绿色,蓝色和alpha分量的百分比值。 range (range record) : 范围记录,表示具有此格式的子字符串的索引和长度。 wordIndex (integer) : 此格式应应用到的可选的1索引字号。使用时,“范围”属性将被忽略。(仅设置)
注意: 脚本只更改一个Cue 如果有多个文本Cue需要批量修改的,可以先复制修改好的Cue, 然后全选其它所有需要修改的Cue,按 command+shift+v 在弹出的花式粘贴选项里 勾选相应的参数
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。