Search code examples
firefoxapplescriptfullscreenkiosk-mode

How to open Firefox in Full Screen mode?


I need to open Firefox on a Mac running Lion in Full Screen mode to act as a kiosk.

I was using the R-Kiosk 0.9.0 Firefox Add-on; but, it conflicts with a print javascript I am also running, so I can't use it.

Anyone know a way to accomplish this? either with an add-on or, perhaps, with AppleScript? Could an AppleScript be triggered to run when Firefox is opened?


Solution

  • This should do it:

    activate application "Firefox"
    delay 2    
    tell application "System Events"
    tell process "Firefox"
        click menu item "Full Screen" of menu 1 of menu bar item "View" of menu bar 1
    end tell
    end tell
    

    or maybe a keystroke:

    activate application "Firefox"
    delay 2
    tell application "System Events"
    keystroke "f" using {command down, shift down}
    end tell