
以下の手順でAppleスクリプトを実行したいと思います。
- ウェブブラウザを全画面にする
- キーボードを無効にする別のアプリケーションを開く
- ウェブブラウザに戻る
Web ブラウザを全画面にすると、現在のスペースの 1 つ右のスペースに移動します。
次のように記述すると、tell applications Web Browser to activate
アクティブなウィンドウに移動しますが、必ずしも全画面のウィンドウに移動するとは限りません。他のウィンドウが開いている場合は、そのウィンドウに移動します。
これが私のこれまでの脚本です
tell application "Firefox"
activate
tell application "System Events"
keystroke "n" using {command down}
end tell
end tell
tell application "Firefox"
activate
tell application "System Events"
keystroke "f" using {command down, control down}
end tell
end tell
tell application "KeyboardCleanTool"
activate
end tell
ここで、Firefox ウィンドウに戻りたいと思います。