Scripting QuickTime

: Frankly, no. It has become a 'programming / scripting" thing with me to
: try to do as many things as possible with AS so I can learn it. It is
: somewhat of a twisted addiction. But I may look into it if no one is able
: to tell me what I am doing wrong.
: Thanks
: jmax
well… i don’t have much time to help now… open an example file (mp3) in quicktime run this script and it should export to AIFF for you no problem…
if you need help opening and batching let me know…
good luck. jc
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
tell application “QuickTime Player”
activate
set the new_file to ¬
choose file name with prompt “Give me a name and a place to live:”
export track 1 to new_file as AIFF using default settings
end tell
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

: It is somewhat of a twisted addiction.
this i understand… but as i recall… exporting from quicktime won’t let you do anything else while exporting. so if you are planning to batch a whole album you might need to leave your machine alone for a bit… hardly a good thing for an addict. itunes will allow you to get your fix as well a perform your desired task. anyway… its your habit – enjoy.
jc

Hi,
It has been a while since I did scripting with QT, but, if you want to try this out and look at it then here’s what I came up with:

 on open file_list 
 tell application "QuickTime Player" 
  launch 
 end tell 
 tell application "Finder" 
  set fold_path to ¬ 
   (make new folder at desktop ¬ 
    with properties {name:"QT_Exported_AIFF"}) as string 
 end tell 
 ---------- 
 repeat with file_ref in file_list 
  ---------- 
  set the_name to name of (info for file_ref) 
  set def_tid to AppleScript's text item delimiters 
  set AppleScript's text item delimiters to {"."} 
  try 
   set ti_list to every text item of the_name 
   set AppleScript's text item delimiters to def_tid 
  on error err_mess 
   set AppleScript's text item delimiters to def_tid 
   display dialog err_mess 
   error err_mess 
  end try 
  set new_name to (item 1 of ti_list & ".aif") 
  ---------- 
  set file_spec to file (fold_path & new_name) 
  ---------- 
  tell application "QuickTime Player" 
   open {file_ref} 
   tell front movie 
    stop 
    rewind 
   end tell 
   try 
    if can export front movie as AIFF then 
     export front movie to file_spec as AIFF 
    else 
  
     display dialog "Can't export " & the_name & " as AIFF." buttons ¬ 
      {"OK"} default button "OK" 
    end if 
   on error 
    try 
     -- do nothing, can't export for some other reason 
     tell application "Finder" to delete file_spec 
    on error 
     beep 3 
    end try 
   end try 
   close front movie saving no 
  end tell 
 end repeat 
 tell application "QuickTime Player" to quit 
end open 

There’s just a little error checking, so, you may want to add more.
gl, Kel.