Before asking the finder to start the application (if start=1 is specified), check that it isn't incidentally running already.

This commit is contained in:
Jack Jansen 2001-08-11 22:29:18 +00:00
parent fb513a20b5
commit b5982221bb
1 changed files with 4 additions and 1 deletions

View 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"""