• 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: wait for Quicktime X export
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >wait for Quicktime X export (From: Karel Bilek <email@hidden>)

  • Prev by Date: wait for Quicktime X export
  • Next by Date: Re: Wake Screen From Sleep
  • Previous by thread: wait for Quicktime X export
  • Next by thread: Re: wait for Quicktime X export
  • Index(es):
    • Date
    • Thread