• 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
Quicktime - export audio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Quicktime - export audio
      • From: Laine Lee <email@hidden>
References: 
 >Quicktime : save export settings problem (From: benoit cantin <email@hidden>)

  • Prev by Date: Quicktime : save export settings problem
  • Next by Date: Re: Setting password of a keychain key
  • Previous by thread: Quicktime : save export settings problem
  • Next by thread: Re: Quicktime - export audio
  • Index(es):
    • Date
    • Thread