Last active
August 29, 2015 14:20
-
-
Save rwenz3l/42bdb25072d075b701c6 to your computer and use it in GitHub Desktop.
Quicktime AutoRecord request
This file contains hidden or 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
-- 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