【问题标题】:Apple Script Increse variableApplescript 增加变量
【发布时间】:2015-12-23 11:45:20
【问题描述】:

您好,我正在尝试在剧院提示软件“Qlab”中创建和运行 AppleScript

tell application id "com.figure53.qlab.3" 
    set cueChannel to 16
    set cueControlChangeNumber to 16
    set cueControlValue to 0

    make type "MIDI"
    set newCue to last item of (selected as list)
    set channel of newCue to cueChannel
    set q name of newCue to DiGiCo
    set command of newCue to control_change
    set byte one of newCue to cueControlChangeNumber
    set byte two of newCue to cueControlValue
end tell

我需要做的是让“字节二”从 0 开始并增加 1 到最大值 127。

此脚本每次都需要单独运行。

有什么想法吗?

【问题讨论】:

    标签: applescript


    【解决方案1】:

    是的,您使用了重复块。不确定每次迭代要重复多少代码。

    tell application id "com.figure53.qlab.3" 
        set cueChannel to 16
        set cueControlChangeNumber to 16
    
        repeat with cueControlValue from 0 to 127
            make type "MIDI"
            set newCue to last item of (selected as list)
            set channel of newCue to cueChannel
            set q name of newCue to DiGiCo
            set command of newCue to control_change
            set byte one of newCue to cueControlChangeNumber
            set byte two of newCue to cueControlValue
        end
    end tell
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-05
      • 1970-01-01
      • 2015-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多