逻辑有一个“主窗口”,在技术上并不总是在前面(可以有更小的浮动窗口等)。所以我不能这样做:
tell application "System Events" to tell process "Logic Pro"
    get value of UI element [xyz] of the front window
end tell主窗口的命名不一致(根据保存的项目的名称而变化),所以我不能这样做:
tell application "System Events" to tell process "Logic Pro"
    get value of UI element [xyz] of window "my project"
end tell有没有什么方法可以一直引用“主窗口”?
发布于 2020-12-19 19:41:39
至少有两种方法:
告诉应用程序"System Events“告诉进程"Logic Pro X”tell (第一个属性"AXMain“的值为真的窗口) --做一些事情end tell end tell
告诉应用程序“系统事件”告诉进程"Logic Pro X“tell (属性"AXDocument”的值以"file://")“开头的第一个窗口--做某事结束告诉结束告诉
https://stackoverflow.com/questions/65369293
复制相似问题