3
1

More than 3 years have passed since last update.

QLab AppleScript: next cue list <cueListの切り替え>

Last updated at Posted at 2019-05-21

QLab4でscript cueを使って指定したcue listをアクティブにする.

はじめにお読みください→About Qlab AppleScript

改良版を作成しました. → QLab AppleScript: next cue list MK-II

AppleScript

Scriptはscript cueのscriptタブに直接書き込む.

next_cue_list.scpt
set nextcueName to "Target_cueList"
set selectcueNumber to "select_cueNumber"

tell application id "com.figure53.QLab.4" to tell front workspace
    set current cue list to first cue list whose q name is nextcueName

    tell current cue list
        if selectcueNumber is "" then
            set tagCue to get first cue
        else if selectcueNumber is not "" then
            set tagCue to get every cue whose q number is selectcueNumber
        end if
    end tell

    set selected to tagCue
    go
end tell

Setting

  • アクティブにしたいcue listの名前をset nextcueName to "Target_cueList"
    Target_cueListに指定する.

  • 指定したcue list内の選択したいcueのNumberをset selectcueNumber to "select_cueNumber"select_cueNumberに指定する. 未指定でも可能.

  • cue listの名前は日本語にも対応.

  • 指定する名前に""を含む場合はバックスラッシュ(\)でエスケープする.
    例)cue listの名前がBGM "Monday"の場合: set nextcueName to "BGM \"Monday\""

Variable

  • Target_cueList

    • 必須
    • 目的とするcueListの名前を指定する.
  • select_cueNumber

    • 任意 (default: first cue)
    • 切り替えてアクティブになったcueListの中で選択するcueNumberを指定する.
    • 未定義の場合、切り替えたcueListの先頭のcueを選択する

Option

  • script cueを実行時にアクティブにしたcue listのcueをスタートするにはset selected to tagCueの下にgoを追加する. 選択状態で待機にする場合にはgoをコメントアウト(--go)する.

Environment

  • macOS High Sierra (10.13.6)
  • QLab 4.4.5

Reference

A CUE LIST A DAY - The QLab Cook Book

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1