Applescript Quicktime Tutorial?

Hi,

can someone point me to a tutorial of how to script quicktime? Is there any?

Thanks

Not that I’m really aware of, but make a few searches here and you’re bound to find a ton of good examples you can learn from.

Sorry, I did that already. That’s the reason why I’m asking for a tutorial.

Well what are you trying to do then with QuickTime? Chances are good someone here can help you put something together with a little guidance.

OK, here is my problem.

I developed a script that splits m4a-files into parts, using a cue-sheed as created by Fission. Fission splitted files do not play gapless in iTunes.

The script contains this code:

						tell application "QuickTime Player"
							open albumFile
							
							repeat with oneTrack in trackList
								
								select front document at (timeF of oneTrack) to (timeT of oneTrack)
								copy front document
								make new document
								paste front document
								save self contained front document in (trackPath of oneTrack)
								close front document
							end repeat
							close front document
						end tell

I import the splitted tracks into iTunes and it seems, that they play gapless, if trackPaths has the extension “.m4a”.
But:
The saved files are in fact Quicktime-Movies, and no M4A-files. It’s not possible, to change the cover-art, if the created files have the extension “.m4a”, only “.mov” works with cover-art. But “.mov” do not play gapless.

So how do I save the front window in a way, that the result file is a real m4a without transcoding. Or do tools exist which extract m4a out of quicktime movies?

I asked this already in a second thread with no helpful answer until today. That’s the reason, why I was asking for a tutorial.

Second problem:
I use this statement for m4a:
select front document at timeF to timeT

If I have a time specified in the cue-sheet mm:ss:ff, I calculate
timeF = mm4410060 + ss44100 + ff44100 div 75

But If I open a mp3 I have to calculate
timeF = mm36000 + ss600 + ff*600 div 75

How does this come? How can I find out out to set the time correctly?