1"""Suite System Events Suite: 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 = 'sevs'
12
13class 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
36class application(aetools.ComponentItem):
37    """application - The System Events application """
38    want = 'capp'
39class _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_()
44class _Prop_folder_actions_enabled(aetools.NProperty):
45    """folder actions enabled - Are Folder Actions currently being processed? """
46    which = 'faen'
47    want = 'bool'
48folder_actions_enabled = _Prop_folder_actions_enabled()
49class _Prop_properties(aetools.NProperty):
50    """properties - every property of the System Events application """
51    which = 'pALL'
52    want = '****'
53properties = _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
66applications = application
67application._superclassnames = []
68import Disk_Folder_File_Suite
69import Standard_Suite
70import Folder_Actions_Suite
71import Login_Items_Suite
72import Processes_Suite
73application._privpropdict = {
74    '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
75    'folder_actions_enabled' : _Prop_folder_actions_enabled,
76    'properties' : _Prop_properties,
77}
78application._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