Re: wait for Quicktime X export
Re: wait for Quicktime X export
- Subject: Re: wait for Quicktime X export
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 22 Dec 2009 11:14:13 -0800
- Thread-topic: wait for Quicktime X export
Try something like this:
set sizeCheck to -1
repeat
tell application "System Events"
set mySize to physical size of alias name_of_mov_file
if mySize = sizeCheck then
exit repeat
else
set sizeCheck to mySize
delay 2
end if
end tell
end repeat
tell application "iTunes"
add (name_of_mov_file as alias)
end tell
Hth,
ES
On 12/22/09 11:05 AM, "Karel Bilek" wrote:
> Hello,
>
> I have a problem with QuickTime X scripting (on Snow Leopard).
>
> I want to tell quicktime to open some document, export it to iPhone
> (meaning "with iPhone settings") and then do something with the file.
>
> However, right now, the QuickTime starts to export the movie, but the
> next program (specifically, iTunes) doesn't wait for the export to be
> completed and throws an error, because the export is not completed
> yet, so the result is running export, but the script is down.
>
> the problematic part of the script
>
> tell application "QuickTime Player"
> close every window
> open avi_file
> export document 1 in name_of_mov_file using settings preset "iPhone"
> close front document
> end tell
>
> tell application "iTunes"
> add (name_of_mov_file as alias)
> end tell
>
> (name_of_mov_file is constructed elsewhere in the script, but it is
> OK, since the export starts and the file exists. however, it is not
> added to iTunes, because it wants to file, that is not yet fully
> exported)
>
> Is there any way out?
>
> Karel BĂlek
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> com
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
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