2015-12-22 2 views
0

Привет там им пытаются создать и AppleScript для запуска в театр установки меток программного обеспечения «QLab»компании Apple Script Increse переменной

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.

Этот сценарий должен запускаться индивидуально каждый раз.

Любые идеи?

ответ

0

Да, вы используете блок повтора. Не уверен, сколько кода вам нужно повторить для каждой итерации.

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 
Смежные вопросы