![]() ![]() Unfortunately neither QuickTime nor AppleScript gives any errors about this, it simply fails silently (more poor design). The export line references a preset that no longer exists (or has been renamed). Having it grab just the most recent document solves this, and future proofs it to a degree. However QuickTime Player under Lion (and possibly Snow Leopard) auto-saves screen recordings as "Screen Recording", "Screen Recording 2", etc., so it was finding no documents. The set newDoc line tries to grab the most recent document with the string "Untitled" to account for the newScreenRecording reference becoming invalid once the recording is stopped (which is probably a poor design decision, but oh well). If you want to capture your system sounds, and not mic/line-in audio, check out this question: Can I get system sound along with QuickTime Player screen recording?įor the curious, there are a couple notes about why the original script doesn't work and QuickTime Player's AppleScript peculiarities: As far as I know, you can't make custom presets. The presets you can choose from are defined in the File > Export dialog:Ĭheck the actual dialog for further details on the presets (note that they are "up to" the resolution listed - it will fit into the horizontal pixels available, so "480p" gives you 640x400 for a 16:10 recording). If you want to automatically export to a different format, you can do that by adding the line export in ("" & (path to desktop) & "quicktimeFile.m4v") using settings preset "480p" before the close line. It will make a new recording for 3 seconds (edit the delay 3 line to change the length), which gets automatically saved in the Movies directory of your Home directory, then closes the recording window. Try this script: tell application "QuickTime Player" ![]() I'm willing to pay for a third-party application provided that it meets my requirements, so feel free to suggest anything that could get the job done. In the past I've used iShowU HD, but I've ran into significant performance issues there which have caused me to go back to the drawing board. This script doesn't error, but it doesn't save anything either. Set f to "" & (path to desktop) & "quicktimeFile"Įxport newDoc in f using settings preset "Quicktime Movie" Set newDoc to last item of (documents whose name contains "Untitled") Set newScreenRecording to new screen recording One thing I've tried for example was a QuickTime script found here. I've tried a few different approaches here and ran into roadblocks. Initiate a screen recording (with system audio).I need to accomplish the following tasks from a script:
0 Comments
Leave a Reply. |