我有一组 Ableton Live 文件(扩展名“.als”),我需要在播放节目时循环浏览这些文件。我想专门使用一个键盘快捷键来启动每个快捷键,并打算为此使用 AppleScript。
问题是每个文件在我播放相关歌曲的过程中都会发生变化,因此当我按下键盘快捷键启动与我的集合中的下一首歌曲关联的 .als 时,Ableton 会打开“关闭前保存更改?” 对话框(此时我想要做的是选择“不保存”)。
此时只需按 command + D 就可以了,但我真的很想自动化这个按键。我似乎无法弄清楚如何让 applescript 做到这一点。我是一个 AppleScript 菜鸟,点击 AS 中的“打开字典”选项似乎表明 Ableton 不是正式的可编写脚本的应用程序。
对此有什么想法吗?这是我一直在尝试的 AppleScript 示例。这将启动在我的设置列表中打开下一个 .als 的过程,但不会单击“不保存”按钮。
tell application "Finder"
activate
open document file "Song 1.als" of folder "Desktop" of folder "User" of folder "Users" of startup disk
end tell
tell application "System Events"
keystroke "d" using command down
end tell