首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >苹果脚本递增变量

苹果脚本递增变量
EN

Stack Overflow用户
提问于 2015-12-23 07:28:39
回答 1查看 88关注 0票数 0

嗨,我正在尝试创建和applescript来在剧院提示软件'Qlab‘中运行。

代码语言:javascript
复制
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

我需要做的是让'byte two‘从0开始,从1增加到最大值127。

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

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2015-12-23 11:15:43

是的,您使用了repeat块。不确定您希望在每次迭代中重复多少代码。

代码语言:javascript
复制
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
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34426178

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档