Last active
February 23, 2016 17:34
-
-
Save willemvb/f9a2e8fa1d71aa7290a2 to your computer and use it in GitHub Desktop.
Startup item to open Chrome as kiosk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save as app from Script Editor with option "stay open after run handler" | |
# Set Chrome to open a specific page | |
on idle | |
tell application "Google Chrome" | |
# No app window | |
try | |
if not (exists first window) then | |
reopen | |
set URL of active tab of first window to "https://spatie.be" | |
end if | |
end try | |
# Focus app, set fullscreen | |
try | |
activate | |
tell first window to enter presentation mode | |
end try | |
end tell | |
# Timeout | |
return 20 | |
end idle | |
on quit | |
continue quit | |
end quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ow yeah