1"""Suite Hidden Suite: Hidden Terms and Events for controlling the System Events application 2Level 1, version 1 3 4Generated from /System/Library/CoreServices/System Events.app 5AETE/AEUT resource version 1/0, language 0, script 0 6""" 7 8import aetools 9import MacOS 10 11_code = 'tpnm' 12 13from StdSuites.Type_Names_Suite import * 14class Hidden_Suite_Events(Type_Names_Suite_Events): 15 16 def do_script(self, _object, _attributes={}, **_arguments): 17 """do script: Execute an OSA script. 18 Required argument: the object for the command 19 Keyword argument _attributes: AppleEvent attribute dictionary 20 """ 21 _code = 'misc' 22 _subcode = 'dosc' 23 24 if _arguments: raise TypeError, 'No optional args expected' 25 _arguments['----'] = _object 26 27 28 _reply, _arguments, _attributes = self.send(_code, _subcode, 29 _arguments, _attributes) 30 if _arguments.get('errn', 0): 31 raise aetools.Error, aetools.decodeerror(_arguments) 32 # XXXX Optionally decode result 33 if _arguments.has_key('----'): 34 return _arguments['----'] 35 36 37# 38# Indices of types declared in this module 39# 40_classdeclarations = { 41} 42 43_propdeclarations = { 44} 45 46_compdeclarations = { 47} 48 49_enumdeclarations = { 50} 51