Attempting to start a screen recording, wait a few seconds, stop the recording and export saved recording to disk.
Versions
- AppleScript 2.2.4
- QuickTime: 10.2
AppleScript
set filePath to "" & (path to desktop)
tell application "QuickTime Player"
set newMovieRecording to new movie recording
tell newMovieRecording
start
delay 2 --(seconds)
stop
export newMovieRecording in (filePath & "movie") using settings preset "25 fps"
end tell
end tell
The stop and start commands work correctly but the export
command is giving failing with this error:
movie_record.scpt:215:294: execution error: QuickTime Player got an error: Can’t get document "Movie Recording". (-1728)