1 """Suite System Events Suite: Terms and Events for controlling the System Events application 2 Level 1, version 1 3 4 Generated from /System/Library/CoreServices/System Events.app 5 AETE/AEUT resource version 1/0, language 0, script 0 6 """ 7 8 import aetools 9 import MacOS 10 11 _code = 'sevs' 12 13 class System_Events_Suite_Events: 14 15 def do_script(self, _object, _attributes={}, **_arguments): 16 """do script: Execute an OSA script. 17 Required argument: the object for the command 18 Keyword argument _attributes: AppleEvent attribute dictionary 19 """ 20 _code = 'misc' 21 _subcode = 'dosc' 22 23 if _arguments: raise TypeError, 'No optional args expected' 24 _arguments['----'] = _object 25 26 27 _reply, _arguments, _attributes = self.send(_code, _subcode, 28 _arguments, _attributes) 29 if _arguments.get('errn', 0): 30 raise aetools.Error, aetools.decodeerror(_arguments) 31 # XXXX Optionally decode result 32 if _arguments.has_key('----'): 33 return _arguments['----'] 34 35 36 class application(aetools.ComponentItem): 37 """application - The System Events application """ 38 want = 'capp' 39 class _Prop__3c_Inheritance_3e_(aetools.NProperty): 40 """<Inheritance> - All of the properties of the superclass. """ 41 which = 'c@#^' 42 want = 'capp' 43 _3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_() 44 class _Prop_folder_actions_enabled(aetools.NProperty): 45 """folder actions enabled - Are Folder Actions currently being processed? """ 46 which = 'faen' 47 want = 'bool' 48 folder_actions_enabled = _Prop_folder_actions_enabled() 49 class _Prop_properties(aetools.NProperty): 50 """properties - every property of the System Events application """ 51 which = 'pALL' 52 want = '****' 53 properties = _Prop_properties() 54 # element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test'] 55 # element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test'] 56 # element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test'] 57 # element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID '] 58 # element 'docu' as ['name', 'indx', 'rele', 'rang', 'test'] 59 # element 'file' as ['name', 'indx', 'rele', 'rang', 'test'] 60 # element 'foac' as ['name', 'indx', 'rele', 'rang', 'test'] 61 # element 'logi' as ['name', 'indx', 'rele', 'rang', 'test'] 62 # element 'pcap' as ['name', 'indx', 'rele', 'rang', 'test'] 63 # element 'pcda' as ['name', 'indx', 'rele', 'rang', 'test'] 64 # element 'prcs' as ['name', 'indx', 'rele', 'rang', 'test'] 65 66 applications = application 67 application._superclassnames = [] 68 import Disk_Folder_File_Suite 69 import Standard_Suite 70 import Folder_Actions_Suite 71 import Login_Items_Suite 72 import Processes_Suite 73 application._privpropdict = { 74 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, 75 'folder_actions_enabled' : _Prop_folder_actions_enabled, 76 'properties' : _Prop_properties, 77 } 78 application._privelemdict = { 79 'application_process' : Processes_Suite.application_process, 80 'desk_accessory_process' : Processes_Suite.desk_accessory_process, 81 'disk' : Disk_Folder_File_Suite.disk, 82 'document' : Standard_Suite.document, 83 'file' : Disk_Folder_File_Suite.file, 84 'folder' : Disk_Folder_File_Suite.folder, 85 'folder_action' : Folder_Actions_Suite.folder_action, 86 'item' : Disk_Folder_File_Suite.item, 87 'login_item' : Login_Items_Suite.login_item, 88 'process' : Processes_Suite.process, 89 'window' : Standard_Suite.window, 90 } 91 92 # 93 # Indices of types declared in this module 94 # 95 _classdeclarations = { 96 'capp' : application, 97 } 98 99 _propdeclarations = { 100 'c@#^' : _Prop__3c_Inheritance_3e_, 101 'faen' : _Prop_folder_actions_enabled, 102 'pALL' : _Prop_properties, 103 } 104 105 _compdeclarations = { 106 } 107 108 _enumdeclarations = { 109 } 110