5
votes

I need an applescript to open safari in full screen an to hide the toolbar on mavericks.

it sounds easy but it isnt!

i need to open safari then open google in full screen mode an then hide the toolbar.

it would be the equivilent to the below sample but instead for safari

tell application "Google Chrome" open location "http://internet.ceo.wa.edu.au/Pages/default.aspx" end tell

tell application "Google Chrome" to activate tell application "System Events" keystroke "f" using {command down, shift down} end tell

2
Welcome to Stack Overflow. Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results.Darrick Herwehe

2 Answers

3
votes

Could be simple as this:

tell application "Safari"
    activate

    if (count of windows) is 0 then -- Remove "if" statement if you don't want to make a new window if there is none
        make new document at front
    end if
    tell application "System Events" to keystroke "f" using {command down, control down}
end tell

Not sure if you can make it with no toolbar at all.

Update 4/4

not sure what you can do with it but look into this program. If it works the way you want. Add a system events to use the drop downs to select the item.

The Barbarian Group has a freeware app called "Plainview", which seems to be just a wrapper around Webkit. It works as a "Fullscreen kiosk-style presentation content viewer", similar to what Chrome presentation mode does.

Anyways, it's a free download, so no risk in trying. Scroll almost to the bottom of this page: http://barbariangroup.com

Direct download: http://s3.amazonaws.com/plainviewapp/plainview_1.0.178.zip

3
votes

Easy way:

set MyApps to {"Google Chrome", "Skype", "Finder"}

repeat with MyApp in MyApps

    tell application MyApp

        activate

        delay 3

        tell application "System Events" to tell process MyApp

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

        end tell

    end tell

end repeat