I am attempting to create an Automator application that will launch Quicktime, create a new audio capture, start that capture, and then save it with a specific filename after the stop button is clicked in the capture window. Although I was able to do this in Lion without any difficulty, I keep running into problems with the Start Capture action in Mountain Lion. Even though the "Wait for capture to complete" checkbox is checked, the action doesn't seem to detect when the stop button is clicked in Quicktime. Any solutions, tricks, or workarounds that would get this working properly would be greatly appreciated!
|
There's a lot that doesn't work with respect to automating QuickTime under Mountain Lion. This is ugly, but it appears to be a workaround that has the key virtue of actually working. In your automator flow, use the action "Run AppleScript". Use this as the script:
This isn't pretty, but it's a workaround. Just about all the code-based ways to script the save command in QuickTime via AppleScript appear to be broken in Mountain Lion. I can't access the path of the frontmost document. I can't export. I can't close saving. It all fails either silently or with an error message. What does seem to work is to send the appropriate keystrokes to simulate a manual file export. So that's what I've done here. I suspect you want your file saved with a name different than "specific file name" and perhaps somewhere other than your desktop. Make the appropriate substitutions in the script so that can happen. The file will then be there on disk; subsequent actions in your workflow can take advantage of it. Note that if your file already exists, you'll get a confirmation dialog in the QT save command, and the script doesn't handle that automatically. |
||||
|
|
|
Rather than using the built-in start capture actions, use an AppleScript action as the trigger to start the recording (and wait for it to stop), then pass the resulting file to Automator to do whatever else you need with it. I modified Daniel Lawson's script slightly:
I removed the export lines1, and changed the references from a variable to simply the Put that in an AppleScript action, and the resulting file will be properly passed to any other actions you have (such as moving/renaming it, or re-encoding). Notes1 QuickTime Player's |
|||
|