ยปCore Development>Code coverage>Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py

Python code coverage for Lib/plat-mac/lib-scriptpackages/SystemEvents/System_Events_Suite.py

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