Quicktime Automation Script- Please Help a Noob

Hi, I’m an ESL teacher in Japan. Please excuse my noobiness, I am not a programmer. I just want to set up a script to record some of my classes with Quicktime at certain class times. Once I have the script working, scheduling it to run in iCal should not be a problem. Here is what I have so far:

tell application “QuickTime Player”
new movie recording
end tell

Seems simple enough, it opens Quicktime, opens a new recording window with video coming in through the camera, but it doesn’t start recording. It gives no errors. I have not tried adding any code to limit the time or save the file as I am kind of trying to figure things out step by step, ie., get it to start recording, and then figure out how to make it stop and save the file, etc. I have searched all over this site and others, there isn’t much info about using Applescript with Quicktime. I am obviously making some mistake which should be easy for a veteran Applescripter to help me with.


Model: MacBook Pro 13.3 2.26
AppleScript: 2.3
Browser: Firefox 3.5.3
Operating System: Mac OS X (10.6)


this is a sample code to record a new movie of 10 seconds

set TimeStamp to do shell script "/bin/date +%Y%m%d-%H%M%S"
set destinationPath to ((path to desktop as text) & TimeStamp & ".mov")
tell application "QuickTime Player"
	new movie recording
	start first recording
	delay 10
	stop first recording
	stop every document
	close document 1 saving in destinationPath
end tell

Thanks a million Stefan. I will try this out and then try to figure out how it works.