Quicktime - export audio
Quicktime - export audio
- Subject: Quicktime - export audio
- From: Feat <email@hidden>
- Date: Fri, 31 Mar 2006 12:14:35 +0200
This is an attempt to convert an audio file using QT player Pro. It was [originally] intended to convert any audio format.
First, this script, fails when calling the convert_audio handler in the 1st tell block, saying:
"Finder got an error: can't continue".
Second, testing the handler alone would yield another error at the [can export] test line:
"no result was returned from some part of this expression".
What am I doing wrong?
Notes:
(1) the AudioFormat property I defined so I coud test many formats with minimum tweaking of the script proper;
(2) the first tell block is for testing purpose only: the whole script is actually intended as a droplet and should be able to process single files as well as folders;
(3) I'm having problems with getting the "name of" expression to extract the file name from the actual path.
Can anybody help?
-------------
property Target_Loc : "Pick a new location"
property AudioFormat : "AIFF"
-------------
tell application "Finder"
set this_item to choose file
set the TargetFolder to (choose folder with prompt Target_Loc) as string
convert_audio(this_item, TargetFolder) -- *** error: can't continue ***
end tell
-------------
on convert_audio(SomeNoise, TargetFolder)
set the file_name to "xxx" -- the name of (SomeNoise as string)
tell application "QuickTime Player"
open SomeNoise
if (can export SomeNoise as AudioFormat) is true then -- *** error ***
set the NewFile to (TargetFolder & file_name)
export SomeNoise to file NewFile as AudioFormat ¬
using default settings ¬
with replacing
end if
end tell
end convert_audio
-------------
--
Jym Feat -- Paris FR 75018
_______________________________________________
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