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
-- 
View this message in context: 
http://forum.world.st/Wait-for-an-external-app-tp3030911p3030911.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to