2003-03-30 18:41:53 -04:00
|
|
|
"""Suite System Events Suite: Terms and Events for controlling the System Events application
|
|
|
|
Level 1, version 1
|
|
|
|
|
|
|
|
Generated from /System/Library/CoreServices/System Events.app
|
|
|
|
AETE/AEUT resource version 1/0, language 0, script 0
|
|
|
|
"""
|
|
|
|
|
|
|
|
import aetools
|
|
|
|
import MacOS
|
|
|
|
|
|
|
|
_code = 'sevs'
|
|
|
|
|
|
|
|
class System_Events_Suite_Events:
|
|
|
|
|
2003-06-13 11:31:19 -03:00
|
|
|
def do_script(self, _object, _attributes={}, **_arguments):
|
|
|
|
"""do script: Execute an OSA script.
|
|
|
|
Required argument: the object for the command
|
|
|
|
Keyword argument _attributes: AppleEvent attribute dictionary
|
|
|
|
"""
|
|
|
|
_code = 'misc'
|
|
|
|
_subcode = 'dosc'
|
|
|
|
|
2007-08-22 21:01:55 -03:00
|
|
|
if _arguments: raise TypeError('No optional args expected')
|
2003-06-13 11:31:19 -03:00
|
|
|
_arguments['----'] = _object
|
|
|
|
|
|
|
|
|
|
|
|
_reply, _arguments, _attributes = self.send(_code, _subcode,
|
|
|
|
_arguments, _attributes)
|
|
|
|
if _arguments.get('errn', 0):
|
2007-08-22 21:01:55 -03:00
|
|
|
raise aetools.Error(aetools.decodeerror(_arguments))
|
2003-06-13 11:31:19 -03:00
|
|
|
# XXXX Optionally decode result
|
|
|
|
if _arguments.has_key('----'):
|
|
|
|
return _arguments['----']
|
2003-03-30 18:41:53 -04:00
|
|
|
|
|
|
|
|
|
|
|
class application(aetools.ComponentItem):
|
2003-04-12 19:27:11 -03:00
|
|
|
"""application - The System Events application """
|
|
|
|
want = 'capp'
|
2003-04-01 18:05:14 -04:00
|
|
|
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
|
2003-04-12 19:27:11 -03:00
|
|
|
"""<Inheritance> - All of the properties of the superclass. """
|
|
|
|
which = 'c@#^'
|
|
|
|
want = 'capp'
|
2003-06-13 11:31:19 -03:00
|
|
|
_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
|
2003-04-01 18:05:14 -04:00
|
|
|
class _Prop_folder_actions_enabled(aetools.NProperty):
|
2003-04-12 19:27:11 -03:00
|
|
|
"""folder actions enabled - Are Folder Actions currently being processed? """
|
|
|
|
which = 'faen'
|
|
|
|
want = 'bool'
|
2003-06-13 11:31:19 -03:00
|
|
|
folder_actions_enabled = _Prop_folder_actions_enabled()
|
2003-04-01 18:05:14 -04:00
|
|
|
class _Prop_properties(aetools.NProperty):
|
2003-04-12 19:27:11 -03:00
|
|
|
"""properties - every property of the System Events application """
|
|
|
|
which = 'pALL'
|
|
|
|
want = '****'
|
2003-06-13 11:31:19 -03:00
|
|
|
properties = _Prop_properties()
|
2003-03-30 18:41:53 -04:00
|
|
|
# element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
|
2003-06-13 11:31:19 -03:00
|
|
|
# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
|
2003-03-30 18:41:53 -04:00
|
|
|
# element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
# element 'foac' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
# element 'logi' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
# element 'pcap' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
# element 'pcda' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
# element 'prcs' as ['name', 'indx', 'rele', 'rang', 'test']
|
|
|
|
|
|
|
|
applications = application
|
|
|
|
application._superclassnames = []
|
2006-04-21 12:44:20 -03:00
|
|
|
from . import Disk_Folder_File_Suite
|
|
|
|
from . import Standard_Suite
|
|
|
|
from . import Folder_Actions_Suite
|
|
|
|
from . import Login_Items_Suite
|
|
|
|
from . import Processes_Suite
|
2003-03-30 18:41:53 -04:00
|
|
|
application._privpropdict = {
|
2003-04-12 19:27:11 -03:00
|
|
|
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
|
|
|
|
'folder_actions_enabled' : _Prop_folder_actions_enabled,
|
|
|
|
'properties' : _Prop_properties,
|
2003-03-30 18:41:53 -04:00
|
|
|
}
|
|
|
|
application._privelemdict = {
|
2003-04-12 19:27:11 -03:00
|
|
|
'application_process' : Processes_Suite.application_process,
|
|
|
|
'desk_accessory_process' : Processes_Suite.desk_accessory_process,
|
2003-05-01 19:06:15 -03:00
|
|
|
'disk' : Disk_Folder_File_Suite.disk,
|
2003-04-12 19:27:11 -03:00
|
|
|
'document' : Standard_Suite.document,
|
2003-05-01 19:06:15 -03:00
|
|
|
'file' : Disk_Folder_File_Suite.file,
|
|
|
|
'folder' : Disk_Folder_File_Suite.folder,
|
2003-04-12 19:27:11 -03:00
|
|
|
'folder_action' : Folder_Actions_Suite.folder_action,
|
2003-05-01 19:06:15 -03:00
|
|
|
'item' : Disk_Folder_File_Suite.item,
|
2003-04-12 19:27:11 -03:00
|
|
|
'login_item' : Login_Items_Suite.login_item,
|
|
|
|
'process' : Processes_Suite.process,
|
|
|
|
'window' : Standard_Suite.window,
|
2003-03-30 18:41:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Indices of types declared in this module
|
|
|
|
#
|
|
|
|
_classdeclarations = {
|
2003-04-12 19:27:11 -03:00
|
|
|
'capp' : application,
|
|
|
|
}
|
|
|
|
|
|
|
|
_propdeclarations = {
|
|
|
|
'c@#^' : _Prop__3c_Inheritance_3e_,
|
|
|
|
'faen' : _Prop_folder_actions_enabled,
|
|
|
|
'pALL' : _Prop_properties,
|
|
|
|
}
|
|
|
|
|
|
|
|
_compdeclarations = {
|
|
|
|
}
|
|
|
|
|
|
|
|
_enumdeclarations = {
|
2003-03-30 18:41:53 -04:00
|
|
|
}
|