I am trying to have a drop on apple script where it converts an audio file then ftps the file and deletes the file from the playlist and the converted file when finished.
In addition trying show progress of the ftp.
i keep getting an error " A descriptor type mismatch occured" I am missing some thing in the script. Possibly passing the correct variable of the file to ftp the audio file.
//script below --------------------------------------
on open audio_file
tell application “iTunes”
set preferred_encoder to current encoder
set available_encoders to (name of encoders)
repeat with anEnc in available_encoders
if format of encoder anEnc is “AAC” then
set current encoder to encoder anEnc
exit repeat
end if
end repeat
convert audio_file
set x to alias audio_file
set current encoder to preferred_encoder
end tell
set user_name to “username”
set pass_word to “password”
set url_name to “url”
set x to new_audio
tell application “URL Access Scripting”
upload x to “ftp://” & user_name & “:” & pass_word & “@” & url_name replacing yes with progress without binhexing
end tell
end open