1

I've written a simple-minded "take a break" reminder which just opens a PDF notice. This works fine, but I wish I could open the PDF file in full screen mode from the command line. Does anyone know how to do that? Perhaps some osascript magic?

#!/bin/sh
B=$HOME/Documents/break.pdf
D=3000
while true
do
        sleep $D
        open $B
done
  • 1
    Why not use AntiRSI tech.inhelsinki.nl/antirsi ? – user588 May 15 '12 at 22:16
  • @mankoff, for the fun of writing my own... – lhf May 15 '12 at 22:26
2

I've found a way. Does anyone way a simpler way?

tell application "Preview"
        activate
end tell

tell application "System Events"
        key down {command}
        key down {shift}
        keystroke "f"
        key up {shift}
        key up {command}
end tell

I wish I could do simply "osascript -e 'application "Preview" to fullscreen'.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .