Skip to content

Instantly share code, notes, and snippets.

@rwenz3l
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwenz3l/42bdb25072d075b701c6 to your computer and use it in GitHub Desktop.
Save rwenz3l/42bdb25072d075b701c6 to your computer and use it in GitHub Desktop.
Quicktime AutoRecord request
-- set the path as POSIX path
set thePath to "Macintosh HD:Users:userName:Documents:"
-- set timeStamp
set theDate to current date
set dateStamp to the year of theDate & "-" & the month of theDate & "-" & the day of theDate & " " & hours of theDate & "-" & minutes of theDate
-- set movieName
set movieName to dateStamp & ".mov"
-- set final path and make it a file reference
set filePath to thePath & movieName
set f to a reference to file filePath
-- let quicktime do it's job
tell application "QuickTime Player"
set newMovieRecording to new movie recording
tell newMovieRecording
start
delay 3 --(seconds)
pause
save newMovieRecording in f
stop
close newMovieRecording
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment