While controlling QuickTime Player via Applescript from within the image, I want to play a CD track until it reaches a certain point. QTP does not expose "playTo: aPosition" functionality, so I'm polling the track position until the time is reached. I don't want to lock up Morphic, so I'm doing this in another thread.
The following works, but I've never used threads before and wanted to get opinions. What do you think?
cd play.
[ [ cd position < endTime ] whileTrue: [ Processor yield ]. cd pause ] fork.
* "cd position" gets the track position via Applescript * endTime is a variable holding the time to play until
Sean