Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ghuntley/4599527 to your computer and use it in GitHub Desktop.
Save ghuntley/4599527 to your computer and use it in GitHub Desktop.
# url.txt should contain the URL load in Chrome in full screen.
do shell script "open '/Applications/Google Chrome.app' " & readFile("/url.txt")
tell application "Google Chrome" to activate
tell application "System Events"
keystroke "f" using {command down, shift down}
end tell
# All this just to read a file; no backticks in AppleScript.
on readFile(unixPath)
set foo to (open for access (POSIX file unixPath))
set txt to (read foo for (get eof foo) as Çclass utf8È)
close access foo
return txt
end readFile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment