2017-03-09 9 views
0

、>編集> OptionwantedAppleScriptのキーストローク私は、メニューバー上のボタンを見つけ</p> <p>私はアプリを使用し、私はこのアプリからデータを取得したい

私はまた、オプションのショートカットを持っていることがわかりました(C + COMD + Ctrl + Shiftキー)

私はこれが最善のアプローチであるかわからないが、私は試してみました:

activate application "App" 

delay 1 
tell application "System Events" to keystroke "C" using {control down, command down, shift} 

しかし、結果は

です
  1. これは、アプリケーションからテキストを取得する最適な方法はありますか?

  2. 私はスクリプトを修正できます。

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"

時間。

+2

リストで 'shift down'を試してください。 – user309603

+0

ありがとう、あなたは問題を解決した、私はこれがとてもシンプルだったと信じられない! –

答えて

0

あなたは近くです。 これは私が持っているものです:

activate application "App" 

delay 1 
tell application "System Events" 
    keystroke "C" using {control down, command down, shift down} 
end tell 
関連する問題