Applescript open application in full screen?

I am trying to configure Alfred to open my terminal, Sublime Text and Chrome using a workflow.

I would like my terminal to open normally as a window, but I tried to get Chrome and Sublime to open full screen.

I managed to open Chrome in full screen using

on alfred_script(q)
   tell application "Google Chrome"
        tell window 1 to enter presentation mode
   end tell
end alfred_script

However, this did not result in working with my Sublime Text.

What am I missing here?

+2
source share
2 answers

As found here ( I need an app to open safari in full screen to hide the toolbar on mavericks )

tell application "Safari"

    activate

    delay 3

    tell application "System Events" to tell process "Safari"

        set value of attribute "AXFullScreen" of window 1 to true

    end tell

end tell
0
source

, , " ", - , (^⌘F). , ( AXFullScreen -see mklement0 answer here ), .

, Safari, :

tell application "Safari" to activate
tell application "System Events"
        keystroke "f" using {command down, control down}
end tell
0

Source: https://habr.com/ru/post/1680730/


All Articles