• 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: quicktime duration changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quicktime duration changes


  • Subject: Re: quicktime duration changes
  • From: Gary Franks <email@hidden>
  • Date: Tue, 3 Jun 2008 09:55:14 -0500

Thanks Alan. Works perfectly.
I truly enjoy seeing and understanding my mistakes.
You can learn more from this list than any AS book on the planet.
All the best
Gary

On Jun 3, 2008, at 8:11 AM, email@hidden wrote:

Message: 10
Date: Tue, 3 Jun 2008 23:09:51 +1000
From: Alan Fairlie <email@hidden>
Subject: Re: quicktime duration changes
To: Gary Franks <email@hidden>
Cc: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"

Give this a try.

tell application "Finder"
	set moviePath to (((path to desktop folder) as string) &
"temp_movies:") as alias
	set outputPath to ((path to desktop folder) as string) & "output:"
	set movieList to name of files in moviePath
end tell

repeat with thisMovie in movieList
	tell application "QuickTime Player"
		open file ((moviePath as string) & thisMovie)
		select all thisMovie
		set new_duration to 5
		set the selection end of document thisMovie to (new_duration * (time
scale of document thisMovie))
		trim document thisMovie
		rewind document thisMovie
		save self contained document thisMovie in file (outputPath &
thisMovie)
		close document thisMovie
	end tell
end repeat


Alan.

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: A bug (was Re: make new folder)-- not a bug!
  • Next by Date: Re: Show/Hide extension
  • Previous by thread: Re: quicktime duration changes
  • Next by thread: Re: Getting iPod Serial Number
  • Index(es):
    • Date
    • Thread