I would like to use an AppleScript which will tell QuickTime Player to start screen recording immediately and stop screen recording after a specified length of time (e.g. 60 mins).
In my search so far, I have come across this AppleScript:
tell application "QuickTime Player"
set newScreenRecording to new screen recording
tell newScreenRecording
start
delay 3
stop
end tell
tell last item of documents
close
end tell
end tell
but I get an error message saying "the variable new screen recording is not defined". I don't know anything about programming as you can probably tell so I'd really appreciate any help you can offer with this.
Best Answer
It's not pretty, but if you click to start the video this will stop it.
Pro tip: Record yourself doing the action you want to automate in automator, drag and drop that operation into a new window and copy the line where it says
click menu...
(Remove the "\" escape characters) into a simpletell application "System Events"
command. But unfortunately it doesn't work for everything.