Skip to content

Instantly share code, notes, and snippets.

@bdelacretaz
Last active July 9, 2019 12:03
Show Gist options
  • Save bdelacretaz/e2ca5b499aeae3b105adfe26a3833f59 to your computer and use it in GitHub Desktop.
Save bdelacretaz/e2ca5b499aeae3b105adfe26a3833f59 to your computer and use it in GitHub Desktop.
AppleScript: play video full screen, wait and exit
--- run this with osascript
set unixFile to "/somepath/movie2.mov"
set macFile to POSIX file unixFile
set fileRef to (macFile as alias)
tell application "QuickTime Player"
activate
set movie to open fileRef
set the looping of movie to false
set the presenting of movie to true
play movie
repeat until (current time of movie = duration of movie)
end repeat
quit
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment