• 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: Copy paste in quicktime player.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy paste in quicktime player.


  • Subject: Re: Copy paste in quicktime player.
  • From: TJ Marbois <email@hidden>
  • Date: Tue, 01 Feb 2005 11:24:52 -0800

Title: Re: Copy paste in quicktime player.
Mr tea

Looks like my problem was somewhere else....Let me try again and see what happens this time.

Thanks!

Tj

On 1/31/05 6:30 PM, "Mr Tea" <email@hidden> wrote:

This from TJ Marbois - dated 31/1/05 11·39 pm:

I output the spoken text using this:

on makeAiff(x)
    set the target_file to ((myFolder as text) & "VOCODED_OUTPUT:" & x & ".aiff")
    say x using "Victoria" saving to target_file
end makeAiff

Now Id like to grab that file and open it via Quicktime player and concatenate another file to the end <snip> the problem seems to be that it happens to fast...Speech hasn't yet output the file...like it needs a bit o delay.


Not on my wheezing G4/867 it doesn’t. Even when the speech being saved to file is quite long (see below), it opens almost instantly in QT player... but this only happens OMM if the folder into which the file must be saved already exists. If the folder “VOCODED_OUTPUT” does not exist, the makeAiff() handler fails silently without producing the required audio file, or generating an error message. When the folder does exist, the following script works fine (provided the file “this one.aiff” and the folder “VOCODED_OUTPUT” are already in place...


global myFolder
global target_file
set myFolder to path to documents folder from user domain
set x to "This unwieldy chunk of text is going to be appended to the front of"
set myFile to (myFolder as text) & "this one.aiff"

makeAiff(x)

tell application "QuickTime Player"
    
activate
   open file
target_file
   select all
   copy movie (name
of window 1)
    
close window 1
   open file myFile
   paste movie (name of window 1)
    
export movie (name of window 1) to ((myFolder as text) & "VOCODED_OUTPUT:" & x & " Processed.aiff") as AIFF
   close window
1 saving no
end tell

on makeAiff(x)
    
set the target_file to ((myFolder as text) & "VOCODED_OUTPUT:" & x & ".aiff")
    
say x using "Victoria" saving to file target_file
end makeAiff


I’ve done hardly any scripting of QuickTime, and I dare say that part of the script could be rendered more elegantly. It’s simply the first thing that worked.  :-)

If you still need a delay, simply add the line ‘delay 1’  to the end of the makeAiff handler to create a one second delay before the script moves on – or substitute a smaller or larger number for the delay as required.

Nick
pp Mr Tea

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Quicktime error type -9995
  • Next by Date: Re: open image sequence in quicktime
  • Previous by thread: Re: Quicktime error type -9995
  • Next by thread: Deleting Message in Mail.app
  • Index(es):
    • Date
    • Thread