• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: quicktime player: make recording ... and save it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quicktime player: make recording ... and save it


  • Subject: Re: quicktime player: make recording ... and save it
  • From: David Schlangen <email@hidden>
  • Date: Wed, 24 Mar 2010 15:12:23 +0100

Hello Axel,

thanks a lot! That seems to have done the trick!

(Applescript is driving me slightly mad with this alias business...)

Cheers,
David.

Am 24.03.2010 um 10:39 schrieb Axel Luttgens:

> Le 22 mars 2010 à 16:24:26, David Schlangen a écrit :
>
>> hi,
>>
>> I'm trying to write an applescript that starts a video recording in QuickTime player, stops it, and then writes it to disk. I've tried the following:
>>
>> set filename to "~/test.mov"
>> tell application "QuickTime Player"
>> 	set newmovie to new movie recording
>> 	start newmovie
>> 	delay 2
>> 	stop newmovie
>> 	save newmovie in filename
>> end tell
>>
>> That does start and stop a recording, but when it comes to saving I get an error number -1728.
>>
>> The actual error message is in German: >>error "„QuickTime Player“ hat einen Fehler erhalten: „document \"Videoaufnahme\"“ kann nicht gelesen werden." number -1728 from document "Videoaufnahme"<<, in English presumably "document `new movie recording' (or whatever the default name of a new movie recording is)" cannot be read". Which is true, because the document is called "Videoaufnahme.mov", or, if there already is one "Videoaufnahme 1.mov" (etc. etc.). But how do I get the real filename. And why does newmovie not have the correct name.
>>
>> (What I'm actually trying to achieve is to start video recording with one script, and then stop and save with another. But for now I'd be happy if I can just start, stop and save in one script...)
>
> Hello David,
>
> Yes, QuickTime Player's dictionary seems, at the very least, to be rather imprecise and frustrating. So, looking at how QTP behaves in the GUI, and with some guesses, I ended with:
>
> tell application "QuickTime Player"
> 	activate
> 	tell (new movie recording)
> 		start
> 		delay 5
> 		stop
> 	end tell
> 	set MovieFile to (file of document of front window) as alias
> 	close front window saving yes
> end tell
>
> tell application "Finder"
> 	move MovieFile to desktop
> 	set name of MovieFile to "test.mov"
> end tell
>
> There sure must be more clever ways; but this one seems to be working more or less reliably...
> HTH,
> Axel
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: quicktime player: make recording ... and save it
      • From: Axel Luttgens <email@hidden>
References: 
 >quicktime player: make recording ... and save it (From: David Schlangen <email@hidden>)
 >Re: quicktime player: make recording ... and save it (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Kai Edwards
  • Next by Date: Re: file written from scratch
  • Previous by thread: Re: quicktime player: make recording ... and save it
  • Next by thread: Re: quicktime player: make recording ... and save it
  • Index(es):
    • Date
    • Thread