Before asking the finder to start the application (if start=1 is specified), check...
authorJack Jansen <jack.jansen@cwi.nl>
Sat, 11 Aug 2001 22:29:18 +0000 (22:29 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sat, 11 Aug 2001 22:29:18 +0000 (22:29 +0000)
Mac/Lib/lib-toolbox/aetools.py

index 42b6b76b377420c91dfd6198e89f4f1e1893cff1..1af761e2d89f7b1fe75e2022fe8e71d1acd9e003 100644 (file)
@@ -161,7 +161,10 @@ class TalkTo:
                
        def start(self):
                """Start the application, if it is not running yet"""
-               _launch(self.target_signature)
+               try:
+                       self.send('ascr', 'noop')
+               except AE.Error:
+                       _launch(self.target_signature)
                        
        def newevent(self, code, subcode, parameters = {}, attributes = {}):
                """Create a complete structure for an apple event"""