[Pythonmac-SIG] Mac OS Error: (-1712, 'the AppleEvent timed out')

transmitRobot adv.files@robbstucky.com
Wed, 20 Jun 2001 10:52:38 -0400


Background:
------------
Trying to control a CDjukebox changer via its AppleScriptAddition 
(AppleEvents).
They implemented AppleScript partially in an App and partially in a 
ScriptingAddition. 
So the GetSuiteModule.py doesn't work without learning far too much about 
the Jukebox's wacky divided internal implementation.

So I am using Lasso Capture AE and AECaptureParser.py to capture what it 
is saying and repeat that from within python.


I have successfully sent the AppleEvent, but CD takes a long time to spin 
up and mount on the local desktop. A very, very, most unpredictable, long 
time. I always get a timeout.
If I set the timeout value to something like 3000 it locks up the machine 
whilst the 3000 is waited out (but at least we didn't get a timeout).


Questions:
-----------

How do I trap Mac OS Error: (-1712, 'the AppleEvent timed out') ?
     except 'Mac OS '.Error: 
doesn't work, neither do a few other random arrangements of Mac, OS, and 
Error.
My tutorial/books don't really cover HOW to trap exceptions
other than the really simple examples. They never utilize the contents of 
the returned tuple.


What are the increment units of start and timeout? Are they really 
seconds?
What is start supposed to do for me?
     aetools.TalkTo.__init__(self, signature, start, timeout)


Is waiting for an AE response functional in a linear script?
Do I have to go to an event loop style, or
should I ignore timeout error and keep re-checking for the physical 
results through os.path?



Thanks Much
Lane