on run argv
set theapp to "Google Chrome"
if application theapp is running then
return
end if
if item 2 of argv is "false" then
set toggleOnFull to true
else
set toggleOnFull to false
end if
tell application theapp
activate
delay 2
(*
Initially from http://stackoverflow.com/questions/8215501/applescript-use-lion-fullscreen
*)
set isFullScreen to false
tell application "System Events" to tell process theapp
set isFullScreen to value of attribute "AXFullScreen" of window 1
end tell
--display dialog "var " & isfullscreen
if isFullScreen is toggleOnFull then
tell application "System Events" to keystroke "f" using {command down, control down}
delay 2
end if
end tell
end run
More than 3 years have passed since last update.
[AppleScript] Chrome Full Screen Mode
Last updated at Posted at 2021-08-14
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme