使用前缀对所选Cue重新编号。工作方式类似于QLab的内置重新编号系统,但首先提示用户输入前缀。
如果你的舞台监督希望所有的音频线索都是A1,A2,A3等,那就太好了。或者如果您有多个屏幕并希望提示编号为S1_1、S1_2、S1_3等。
该脚本围绕现有的Cue数字工作,只是跳过这些数字。
脚本:添加一个脚本Cue,然后将以下 脚本代码文本复制并将其粘贴到QLab工作区的脚本Cue中。
我建议给它分配一个热键,或者喜欢用字母给予每个脚本Cue一个唯一的编号然后触发它。
--Renumber selected cues using a prefix. Works similar to QLab's built-in renumbering system, but first prompts the user for a prefix.
--Great if your stage manager wants all the audio cues to be A1, A2, A3, etc. or if you have multiple screens and want cues to be numbered S1_1, S1_2, S1_3, etc.
--Taylor Glad
--Global Variables
set selectedCues to ""
set qString to ""
set qNumber to ""
set qIncrement to 1
tell application id "com.figure53.QLab.4" to tell front workspace
set selectedCues to selected as list
display dialog "Enter letter/string (no spaces)" default answer "" with title "Renumber with Letters" with icon 1
set qString to text returned of result as string
end tell
AskStart()
on AskStart()
tell application id "com.figure53.QLab.4" to tell front workspace
display dialog "Start at" default answer "" with title "Renumber with String" with icon 1
end tell
try
set qNumber to text returned of result as number
return qNumber
on error
tell application id "com.figure53.QLab.4" to tell front workspace
display dialog "That is not a number" with title "Renumber with String" with icon 2
end tell
AskStart()
end try
end AskStart
set qNumber to result
AskInc()
on AskInc()
tell application id "com.figure53.QLab.4" to tell front workspace
display dialog "increment by" default answer "1" with title "Renumber with String" with icon 1
end tell
try
set qIncrement to text returned of result as number
return qIncrement
on error
tell application id "com.figure53.QLab.4" to tell front workspace
display dialog "That is not a number" with title "Renumber with String" with icon 2
end tell
AskInc()
end try
end AskInc
set qIncrement to result
RenumberCue(selectedCues, qString, qNumber, qIncrement)
on RenumberCue(selectedCues, qString, qNumber, qIncrement)
tell application id "com.figure53.QLab.4" to tell front workspace
repeat with eachCue in selectedCues
set the q number of eachCue to ""
end repeat
--Removes the existing Cue Numbers
set qNumber to qNumber - qIncrement
--subtracts one increment, so that the first cue in the loop doesn't start one increment higher than specified
repeat with eachCue in selectedCues
repeat until q number of eachCue is qString & qNumber
set qNumber to qNumber + qIncrement
set the q number of eachCue to qString & qNumber
end repeat
if (qNumber mod 1 is 0.0) then set qNumber to qNumber div 1
--Removes the .0 from whole numbers
end repeat
end tell
end RenumberCue
(PS:此脚本应用于QLab4 此功能现已包含在QLab 5中)