MACSCRPT Archives

July 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Andreas Kiel <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 14 Jul 2008 18:20:18 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
Thanks Mark,

Just tried the code and it seems it is very close to perfect for me.  
Together with the stuff I got it looks like the solution :) :)

Many thanks
Andreas

On 14.07.2008, at 17:28, Mark Lively wrote:

> Very quick and very dirty, but I hope this helps.
>
> on launched theObject
> 	--display dialog name of every text field of window 1
> 	set myMovie to POSIX path of (choose file)
> 	set qtMovie to call method "movieWithFile:error:" of class  
> "QTMovie" with parameters {myMovie, 0}
> 	mylog(myMovie)
> 	set aname to call method "movieAttributes" of qtMovie ---This  
> returns a dictionary the same as an AS record
> 	set aname to call method "description" of aname --Quick and Dirty  
> way to convert it to text
> 	mylog(tab & aname)
> 	set tracklist to call method "tracks" of qtMovie
> 	repeat with atrack in tracklist
> 		--returns a record that you can pull apart
> 		set aname to call method "trackAttributes" of atrack
> 		set trackname to |QTTrackDisplayNameAttribute| of aname
> 		mylog(trackname)
> 		set aname to call method "description" of aname
> 		mylog(tab & tab & aname)
> 		-- to get one attribute
> 		-- set aname to call method "attributeForKey:" of atrack with  
> parameter "QTTrackDisplayNameAttribute"
> 	end repeat
> end launched
>
> on mylog(someText)
> 	set oldcontent to content of text view 1 of scroll view "myBox" of  
> window 1
> 	set content of text view 1 of scroll view "myBox" of window 1 to  
> oldcontent & someText & return
> end mylog
>
>
>
> -Mark
> who should have thought of calling description on a record a LONG  
> LONG time ago.

ATOM RSS1 RSS2