我使用的應用程序,我想從這個應用程序數據,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
謝謝你解決了這個問題,我簡直不敢相信這很簡單! –