automator で初めて Apple スクリプトを使用しています。以前に起動したアプリケーション内でキーボード ショートカットを実行するスクリプトが必要です。
on run
activate application "MacCaption"
tell application "MacCaption"
keystroke "x" using command down
end tell
構文エラーが発生すると予想される行末ですが、使用中の単語に識別子が見つかりました。
automator で初めて Apple スクリプトを使用しています。以前に起動したアプリケーション内でキーボード ショートカットを実行するスクリプトが必要です。
on run
activate application "MacCaption"
tell application "MacCaption"
keystroke "x" using command down
end tell
構文エラーが発生すると予想される行末ですが、使用中の単語に識別子が見つかりました。
あなたの問題は、keystroke
システム イベントを通過する必要があることです。また:
tell app "System Events"
keystroke "x" using command down
end tell
また
tell app "System Events"
tell process "MacCaption"
keystroke "x" using command down
end tell
end tell
実際の違いはありませんが、システム イベントが必要です。
試す:
tell application "System Events" to keystroke "x" using command down