我使用的应用程序,我想从这个应用程序数据,AppleScript的按键
我发现菜单栏上的按钮>编辑> Optionwanted
我还发现,选项有一个捷径(C + + COMD CTRL + SHIFT)
我不知道这是最好的方法,但我想:
activate application "App"
delay 1
tell application "System Events" to keystroke "C" using {control down, command down, shift}
但随后的结果是
System Events got an error: Can’t make {control down, command down, shift} into type constant or list of constant.
是从应用程序获取文本的最佳方法?
我可以修复我的脚本。
PS:当我运行
tell application "System Events" to tell application process "App"
set stuff to entire contents of front window
end tell
return stuff
我可以看到我想要的有:
application process "App", static text "445511" of group 3 of group 1 of group 2 of group 5 of UI element 1 of scroll area 1 of group 2 of group 1 of group 2 of UI element 1 of scroll area 1 of splitter group 1 of window "The Title is actually not static"
这可以是另一种方法,但标题和文本是动态的和更改所有时间。
尝试在列表中向下移动。 – user309603
谢谢你解决了这个问题,我简直不敢相信这很简单! –