• 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: Convert to Aiff Folder Action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert to Aiff Folder Action


  • Subject: Re: Convert to Aiff Folder Action
  • From: Jay Louvion <email@hidden>
  • Date: Mon, 25 Sep 2006 10:07:01 +0200
  • Thread-topic: Convert to Aiff Folder Action

Title: Re: Convert to Aiff Folder Action
On 25.9.2006 7:07, "Brandon Hunt" <email@hidden> spake thus:

> Ok I am A First Time Scripter so I am a little new
>
> I Work With Final Cut pro and the fileformat that it likes you audio files
> to be in is Aiff and for each project that I work on I drop the audio files
> into a forlder for that project. I usualy have to use Quicktime pro to
> convert these files to Aiff and then drag them into the folder. I noticed
> that Quicktime is scriptable and was wondering if you could make an apple
> script to convert Files that are not aiff into aiff and then put them in the
> folder.
>
> Thanks and sorry I am just starting out with scripting and would love to
> learn.
>


Well then welcome, you’re going to have a lot of fun. And by fun I of course mean the kind you get by trying things over and over again until they work.
This should do the trick ;) I’m using QT7, but it should work in earlier versions.

on adding folder items to this_folder after receiving these_items
   repeat with the_file in these_items
       set old_name to name of (info for the_file)
        set short_name to items 1 thru -4 of old_name as text --this line is a bit of magic to get a file name without an extension (providing there is an extension and it’s three character long...mmhh kinda dodgy, but does the trick most times)
       tell application "Finder" to set new_file to (container of the_file as text) & short_name & "_converted.aiff" as string
       tell application "QuickTime Player"
            open the_file
           if (can export movie 1 as AIFF = true) then
               export movie 1 to new_file as AIFF with replacing
           end if
           close movie 1
        end tell
   end repeat
end
adding folder items to


Cordialement,

j.

Jay Louvion
Studio Casagrande
3, rue Müller-Brun
1208 Geneva

T+4122 840 3272
F+4122 840 3271

skypeme:
jaylouvion

www.studiocasagrande.com


P Please consider the environment before printing this email.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Convert to Aiff Folder Action
      • From: Brandon Hunt <email@hidden>
References: 
 >Convert to Aiff Folder Action (From: Brandon Hunt <email@hidden>)

  • Prev by Date: Re: List MOM, et al.
  • Next by Date: Re: AppleScript runs slow on Intel Macs
  • Previous by thread: Re: Convert to Aiff Folder Action
  • Next by thread: Re: Convert to Aiff Folder Action
  • Index(es):
    • Date
    • Thread