[Stackless-checkins] CVS: slpdev/src/2.2/src/Lib/plat-mac/lib-scriptpackages/SystemEvents Disk_Folder_File_Suite.py, NONE, 1.1 Folder_Actions_Suite.py, NONE, 1.1 Hidden_Suite.py, NONE, 1.1 Login_Items_Suite.py, NONE, 1.1 Power_Suite.py, NONE, 1.1 Processes_Suite.py, NONE, 1.1 Standard_Suite.py, NONE, 1.1 System_Events_Suite.py, NONE, 1.1 Text_Suite.py, NONE, 1.1 __init__.py, NONE, 1.1
Christian Tismer
tismer at centera.de
Sat May 1 02:54:17 CEST 2004
- Previous message: [Stackless-checkins] CVS: slpdev/src/2.2/src/Lib/plat-mac/lib-scriptpackages/StdSuites AppleScript_Suite.py, NONE, 1.1 Macintosh_Connectivity_Clas.py, NONE, 1.1 QuickDraw_Graphics_Suite.py, NONE, 1.1 QuickDraw_Graphics_Suppleme.py, NONE, 1.1 Required_Suite.py, NONE, 1.1 Standard_Suite.py, NONE, 1.1 Table_Suite.py, NONE, 1.1 Text_Suite.py, NONE, 1.1 Type_Names_Suite.py, NONE, 1.1 __init__.py, NONE, 1.1
- Next message: [Stackless-checkins] CVS: slpdev/src/2.2/src/Lib/plat-mac/lib-scriptpackages/Terminal Standard_Suite.py, NONE, 1.1 Terminal_Suite.py, NONE, 1.1 Text_Suite.py, NONE, 1.1 __init__.py, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/slpdev/src/2.2/src/Lib/plat-mac/lib-scriptpackages/SystemEvents
In directory centera.de:/home/tismer/slpdev/src/2.2/src/Lib/plat-mac/lib-scriptpackages/SystemEvents
Added Files:
Disk_Folder_File_Suite.py Folder_Actions_Suite.py
Hidden_Suite.py Login_Items_Suite.py Power_Suite.py
Processes_Suite.py Standard_Suite.py System_Events_Suite.py
Text_Suite.py __init__.py
Log Message:
added files
--- NEW FILE: Disk_Folder_File_Suite.py ---
"""Suite Disk-Folder-File Suite: Terms and Events for controlling Disks, Folders, and Files
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 = 'cdis'
class Disk_Folder_File_Suite_Events:
_argmap_move = {
'to' : 'insh',
}
def move(self, _object, _attributes={}, **_arguments):
"""move: Move disk item(s) to a new location.
Required argument: the object for the command
Keyword argument to: The new location for the disk item(s).
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'core'
_subcode = 'move'
aetools.keysubst(_arguments, self._argmap_move)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
class application(aetools.ComponentItem):
"""application - The Disk-Folder-File Suite host program """
want = 'capp'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - All of the properties of the superclass. """
which = 'c@#^'
want = 'capp'
_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
class _Prop_folder_actions_enabled(aetools.NProperty):
"""folder actions enabled - Are Folder Actions currently being processed? """
which = 'faen'
want = 'bool'
folder_actions_enabled = _Prop_folder_actions_enabled()
class _Prop_properties(aetools.NProperty):
"""properties - every property of the Disk-Folder-File Suite host program """
which = 'pALL'
want = '****'
properties = _Prop_properties()
# element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
# 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
class disk(aetools.ComponentItem):
"""disk - A disk in the file system """
want = 'cdis'
class _Prop_POSIX_path(aetools.NProperty):
"""POSIX path - the POSIX file system path of the disk """
which = 'posx'
want = 'utxt'
class _Prop_capacity(aetools.NProperty):
"""capacity - the total number of bytes (free or used) on the disk """
which = 'capa'
want = 'magn'
class _Prop_ejectable(aetools.NProperty):
"""ejectable - Can the media be ejected (floppies, CD's, and so on)? """
which = 'isej'
want = 'bool'
class _Prop_format(aetools.NProperty):
"""format - the file system format of this disk """
which = 'dfmt'
want = 'edfm'
class _Prop_free_space(aetools.NProperty):
"""free space - the number of free bytes left on the disk """
which = 'frsp'
want = 'magn'
class _Prop_ignore_privileges(aetools.NProperty):
"""ignore privileges - Ignore permissions on this disk? """
which = 'igpr'
want = 'bool'
class _Prop_local_volume(aetools.NProperty):
"""local volume - Is the media a local volume (as opposed to a file server? """
which = 'isrv'
want = 'bool'
class _Prop_name(aetools.NProperty):
"""name - the name of the disk """
which = 'pnam'
want = 'utxt'
class _Prop_path(aetools.NProperty):
"""path - the file system path of the disk """
which = 'ppth'
want = 'utxt'
class _Prop_startup(aetools.NProperty):
"""startup - Is this disk the boot disk? """
which = 'istd'
want = 'bool'
class _Prop_volume(aetools.NProperty):
"""volume - the volume on which the folder resides """
which = 'volu'
want = 'utxt'
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
disks = disk
class folder(aetools.ComponentItem):
"""folder - A folder in the file system """
want = 'cfol'
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
folders = folder
class item(aetools.ComponentItem):
"""item - An item in the file system """
want = 'cobj'
class _Prop_busy_status(aetools.NProperty):
"""busy status - Is the item busy? """
which = 'busy'
want = 'bool'
class _Prop_creation_date(aetools.NProperty):
"""creation date - the date on which the item was created """
which = 'ascd'
want = '****'
class _Prop_modification_date(aetools.NProperty):
"""modification date - the date on which the item was last modified """
which = 'asmo'
want = '****'
class _Prop_name_extension(aetools.NProperty):
"""name extension - the extension portion of the name """
which = 'extn'
want = 'utxt'
class _Prop_package_folder(aetools.NProperty):
"""package folder - Is the item a package? """
which = 'pkgf'
want = 'bool'
class _Prop_url(aetools.NProperty):
"""url - the url of the item """
which = 'url '
want = 'utxt'
class _Prop_visible(aetools.NProperty):
"""visible - Is the item visible? """
which = 'visi'
want = 'bool'
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
items = item
class file(aetools.ComponentItem):
"""file - A file in the file system """
want = 'file'
class _Prop_creator_type(aetools.NProperty):
"""creator type - the OSType identifying the application that created the item """
which = 'fcrt'
want = 'utxt'
class _Prop_file_type(aetools.NProperty):
"""file type - the OSType identifying the type of data contained in the item """
which = 'asty'
want = 'utxt'
class _Prop_physical_size(aetools.NProperty):
"""physical size - the actual space used by the file on disk """
which = 'phys'
want = 'magn'
class _Prop_product_version(aetools.NProperty):
"""product version - the version of the product (visible at the top of the ?et Info?window) """
which = 'ver2'
want = 'utxt'
class _Prop_size(aetools.NProperty):
"""size - the logical size of the file """
which = 'ptsz'
want = 'magn'
class _Prop_stationery(aetools.NProperty):
"""stationery - Is the file a stationery pad? """
which = 'pspd'
want = 'bool'
class _Prop_version(aetools.NProperty):
"""version - the version of the file (visible at the bottom of the ?et Info?window) """
which = 'vers'
want = 'utxt'
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
files = file
application._superclassnames = []
import Standard_Suite
import Folder_Actions_Suite
import Login_Items_Suite
import Processes_Suite
application._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'folder_actions_enabled' : _Prop_folder_actions_enabled,
'properties' : _Prop_properties,
}
application._privelemdict = {
'application_process' : Processes_Suite.application_process,
'desk_accessory_process' : Processes_Suite.desk_accessory_process,
'disk' : disk,
'document' : Standard_Suite.document,
'file' : file,
'folder' : folder,
'folder_action' : Folder_Actions_Suite.folder_action,
'item' : item,
'login_item' : Login_Items_Suite.login_item,
'process' : Processes_Suite.process,
'window' : Standard_Suite.window,
}
disk._superclassnames = ['item']
disk._privpropdict = {
'POSIX_path' : _Prop_POSIX_path,
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'capacity' : _Prop_capacity,
'ejectable' : _Prop_ejectable,
'format' : _Prop_format,
'free_space' : _Prop_free_space,
'ignore_privileges' : _Prop_ignore_privileges,
'local_volume' : _Prop_local_volume,
'name' : _Prop_name,
'path' : _Prop_path,
'properties' : _Prop_properties,
'startup' : _Prop_startup,
'volume' : _Prop_volume,
}
disk._privelemdict = {
'file' : file,
'folder' : folder,
'item' : item,
}
folder._superclassnames = ['item']
folder._privpropdict = {
'POSIX_path' : _Prop_POSIX_path,
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'name' : _Prop_name,
'path' : _Prop_path,
'properties' : _Prop_properties,
'volume' : _Prop_volume,
}
folder._privelemdict = {
'file' : file,
'file' : file,
'folder' : folder,
'folder' : folder,
'item' : item,
'item' : item,
}
item._superclassnames = []
item._privpropdict = {
'POSIX_path' : _Prop_POSIX_path,
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'busy_status' : _Prop_busy_status,
'creation_date' : _Prop_creation_date,
'modification_date' : _Prop_modification_date,
'name' : _Prop_name,
'name_extension' : _Prop_name_extension,
'package_folder' : _Prop_package_folder,
'path' : _Prop_path,
'properties' : _Prop_properties,
'url' : _Prop_url,
'visible' : _Prop_visible,
'volume' : _Prop_volume,
}
item._privelemdict = {
'file' : file,
'folder' : folder,
'item' : item,
}
file._superclassnames = ['item']
file._privpropdict = {
'POSIX_path' : _Prop_POSIX_path,
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'creator_type' : _Prop_creator_type,
'file_type' : _Prop_file_type,
'name' : _Prop_name,
'path' : _Prop_path,
'physical_size' : _Prop_physical_size,
'product_version' : _Prop_product_version,
'properties' : _Prop_properties,
'size' : _Prop_size,
'stationery' : _Prop_stationery,
'version' : _Prop_version,
'volume' : _Prop_volume,
}
file._privelemdict = {
'file' : file,
'folder' : folder,
'item' : item,
}
_Enum_edfm = {
'MS_2d_DOS_format' : 'dfms', # MS-DOS format
'Apple_Photo_format' : 'dfph', # Apple Photo format
'ISO_9660_format' : 'df96', # ISO 9660 format
'QuickTake_format' : 'dfqt', # QuickTake format
'AppleShare_format' : 'dfas', # AppleShare format
'High_Sierra_format' : 'dfhs', # High Sierra format
'Mac_OS_Extended_format' : 'dfh+', # Mac OS Extended format
'UDF_format' : 'dfud', # UDF format
'unknown_format' : 'df??', # unknown format
'audio_format' : 'dfau', # audio format
'Mac_OS_format' : 'dfhf', # Mac OS format
'UFS_format' : 'dfuf', # UFS format
'NFS_format' : 'dfnf', # NFS format
'ProDOS_format' : 'dfpr', # ProDOS format
'WebDAV_format' : 'dfwd', # WebDAV format
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
'cdis' : disk,
'cfol' : folder,
'cobj' : item,
'file' : file,
}
_propdeclarations = {
'ascd' : _Prop_creation_date,
'asmo' : _Prop_modification_date,
'asty' : _Prop_file_type,
'busy' : _Prop_busy_status,
'c@#^' : _Prop__3c_Inheritance_3e_,
'capa' : _Prop_capacity,
'dfmt' : _Prop_format,
'extn' : _Prop_name_extension,
'faen' : _Prop_folder_actions_enabled,
'fcrt' : _Prop_creator_type,
'frsp' : _Prop_free_space,
'igpr' : _Prop_ignore_privileges,
'isej' : _Prop_ejectable,
'isrv' : _Prop_local_volume,
'istd' : _Prop_startup,
'pALL' : _Prop_properties,
'phys' : _Prop_physical_size,
'pkgf' : _Prop_package_folder,
'pnam' : _Prop_name,
'posx' : _Prop_POSIX_path,
'ppth' : _Prop_path,
'pspd' : _Prop_stationery,
'ptsz' : _Prop_size,
'url ' : _Prop_url,
'ver2' : _Prop_product_version,
'vers' : _Prop_version,
'visi' : _Prop_visible,
'volu' : _Prop_volume,
}
_compdeclarations = {
}
_enumdeclarations = {
'edfm' : _Enum_edfm,
}
--- NEW FILE: Folder_Actions_Suite.py ---
"""Suite Folder Actions Suite: Terms and Events for controlling Folder Actions
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 = 'faco'
class Folder_Actions_Suite_Events:
_argmap_attach_action_to = {
'using' : 'faal',
}
def attach_action_to(self, _object, _attributes={}, **_arguments):
"""attach action to: Attach an action to a folder
Required argument: the object for the command
Keyword argument using: a file containing the script to attach
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'faco'
_subcode = 'atfa'
aetools.keysubst(_arguments, self._argmap_attach_action_to)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
def attached_scripts(self, _object, _attributes={}, **_arguments):
"""attached scripts: List the actions attached to a folder
Required argument: the object for the command
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'faco'
_subcode = 'lact'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_do_folder_action = {
'with_window_size' : 'fnsz',
'with_item_list' : 'flst',
'folder_action_code' : 'actn',
}
def do_folder_action(self, _object, _attributes={}, **_arguments):
"""do folder action: Event the Finder sends to the Folder Actions FBA
Required argument: the object for the command
Keyword argument with_window_size: the new window size for the folder action message to process
Keyword argument with_item_list: a list of items for the folder action message to process
Keyword argument folder_action_code: the folder action message to process
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'faco'
_subcode = 'fola'
aetools.keysubst(_arguments, self._argmap_do_folder_action)
_arguments['----'] = _object
aetools.enumsubst(_arguments, 'actn', _Enum_actn)
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_edit_action_of = {
'using_action_name' : 'snam',
'using_action_number' : 'indx',
}
def edit_action_of(self, _object, _attributes={}, **_arguments):
"""edit action of: Edit as action of a folder
Required argument: the object for the command
Keyword argument using_action_name: ...or the name of the action to edit
Keyword argument using_action_number: the index number of the action to edit...
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'faco'
_subcode = 'edfa'
aetools.keysubst(_arguments, self._argmap_edit_action_of)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_remove_action_from = {
'using_action_name' : 'snam',
'using_action_number' : 'indx',
}
def remove_action_from(self, _object, _attributes={}, **_arguments):
"""remove action from: Remove a folder action from a folder
Required argument: the object for the command
Keyword argument using_action_name: ...or the name of the action to remove
Keyword argument using_action_number: the index number of the action to remove...
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'faco'
_subcode = 'rmfa'
aetools.keysubst(_arguments, self._argmap_remove_action_from)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
class application(aetools.ComponentItem):
"""application - The Folder Actions Suite host program """
want = 'capp'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - All of the properties of the superclass. """
which = 'c@#^'
want = 'capp'
_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
class _Prop_folder_actions_enabled(aetools.NProperty):
"""folder actions enabled - Are Folder Actions currently being processed? """
which = 'faen'
want = 'bool'
folder_actions_enabled = _Prop_folder_actions_enabled()
class _Prop_properties(aetools.NProperty):
"""properties - every property of the Folder Actions Suite host program """
which = 'pALL'
want = '****'
properties = _Prop_properties()
# element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
# 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
class folder_action(aetools.ComponentItem):
"""folder action - An action attached to a folder in the file system """
want = 'foac'
class _Prop_name(aetools.NProperty):
"""name - the name of the folder action, which is also the name of the folder """
which = 'pnam'
want = 'utxt'
class _Prop_path(aetools.NProperty):
"""path - the path to the folder to which the folder action applies """
which = 'ppth'
want = '****'
class _Prop_volume(aetools.NProperty):
"""volume - the volume on which the folder action resides """
which = 'volu'
want = 'utxt'
# element 'scpt' as ['name', 'indx', 'rele', 'rang', 'test']
folder_actions = folder_action
class script(aetools.ComponentItem):
"""script - A script invoked by a folder action """
want = 'scpt'
class _Prop_POSIX_path(aetools.NProperty):
"""POSIX path - the POSIX file system path of the disk """
which = 'posx'
want = 'utxt'
scripts = script
application._superclassnames = []
import Disk_Folder_File_Suite
import Standard_Suite
import Login_Items_Suite
import Processes_Suite
application._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'folder_actions_enabled' : _Prop_folder_actions_enabled,
'properties' : _Prop_properties,
}
application._privelemdict = {
'application_process' : Processes_Suite.application_process,
'desk_accessory_process' : Processes_Suite.desk_accessory_process,
'disk' : Disk_Folder_File_Suite.disk,
'document' : Standard_Suite.document,
'file' : Disk_Folder_File_Suite.file,
'folder' : Disk_Folder_File_Suite.folder,
'folder_action' : folder_action,
'item' : Disk_Folder_File_Suite.item,
'login_item' : Login_Items_Suite.login_item,
'process' : Processes_Suite.process,
'window' : Standard_Suite.window,
}
folder_action._superclassnames = ['item']
folder_action._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'name' : _Prop_name,
'path' : _Prop_path,
'properties' : _Prop_properties,
'volume' : _Prop_volume,
}
folder_action._privelemdict = {
'script' : script,
}
script._superclassnames = ['item']
script._privpropdict = {
'POSIX_path' : _Prop_POSIX_path,
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'name' : _Prop_name,
'path' : _Prop_path,
'properties' : _Prop_properties,
}
script._privelemdict = {
}
_Enum_actn = {
'items_added' : 'fget', # items added
'items_removed' : 'flos', # items removed
'window_closed' : 'fclo', # window closed
'window_moved' : 'fsiz', # window moved
'window_opened' : 'fopn', # window opened
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
'foac' : folder_action,
'scpt' : script,
}
_propdeclarations = {
'c@#^' : _Prop__3c_Inheritance_3e_,
'faen' : _Prop_folder_actions_enabled,
'pALL' : _Prop_properties,
'pnam' : _Prop_name,
'posx' : _Prop_POSIX_path,
'ppth' : _Prop_path,
'volu' : _Prop_volume,
}
_compdeclarations = {
}
_enumdeclarations = {
'actn' : _Enum_actn,
}
--- NEW FILE: Hidden_Suite.py ---
"""Suite Hidden Suite: Hidden 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 = 'tpnm'
from StdSuites.Type_Names_Suite import *
class Hidden_Suite_Events(Type_Names_Suite_Events):
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'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}
--- NEW FILE: Login_Items_Suite.py ---
"""Suite Login Items Suite: Terms and Events for controlling the Login Items 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 = 'logi'
class Login_Items_Suite_Events:
pass
class login_item(aetools.ComponentItem):
"""login item - an item to be launched or opened at login """
want = 'logi'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - All of the properties of the superclass. """
which = 'c@#^'
want = 'cobj'
class _Prop_hidden(aetools.NProperty):
"""hidden - Is the Login Item hidden when launched? """
which = 'hidn'
want = 'bool'
class _Prop_kind(aetools.NProperty):
"""kind - the file type of the Login Item """
which = 'kind'
want = 'utxt'
class _Prop_name(aetools.NProperty):
"""name - the name of the Login Item """
which = 'pnam'
want = 'utxt'
class _Prop_path(aetools.NProperty):
"""path - the file system path to the Login Item """
which = 'ppth'
want = 'utxt'
login_items = login_item
import Standard_Suite
login_item._superclassnames = ['item']
login_item._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'hidden' : _Prop_hidden,
'kind' : _Prop_kind,
'name' : _Prop_name,
'path' : _Prop_path,
}
login_item._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'logi' : login_item,
}
_propdeclarations = {
'c@#^' : _Prop__3c_Inheritance_3e_,
'hidn' : _Prop_hidden,
'kind' : _Prop_kind,
'pnam' : _Prop_name,
'ppth' : _Prop_path,
}
_compdeclarations = {
}
_enumdeclarations = {
}
--- NEW FILE: Power_Suite.py ---
"""Suite Power Suite: Terms and Events for controlling System power
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 = 'powr'
class Power_Suite_Events:
def restart(self, _object, _attributes={}, **_arguments):
"""restart: Restart the computer
Required argument: the object for the command
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'rest'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
def shut_down(self, _object, _attributes={}, **_arguments):
"""shut down: Shut Down the computer
Required argument: the object for the command
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'shut'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
def sleep(self, _object, _attributes={}, **_arguments):
"""sleep: Put the computer to sleep
Required argument: the object for the command
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'slep'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
class application(aetools.ComponentItem):
"""application - The System Events application """
want = 'capp'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - All of the properties of the superclass. """
which = 'c@#^'
want = 'capp'
_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
class _Prop_folder_actions_enabled(aetools.NProperty):
"""folder actions enabled - Are Folder Actions currently being processed? """
which = 'faen'
want = 'bool'
folder_actions_enabled = _Prop_folder_actions_enabled()
class _Prop_properties(aetools.NProperty):
"""properties - every property of the System Events application """
which = 'pALL'
want = '****'
properties = _Prop_properties()
# element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
# 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 = []
import Disk_Folder_File_Suite
import Standard_Suite
import Folder_Actions_Suite
import Login_Items_Suite
import Processes_Suite
application._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'folder_actions_enabled' : _Prop_folder_actions_enabled,
'properties' : _Prop_properties,
}
application._privelemdict = {
'application_process' : Processes_Suite.application_process,
'desk_accessory_process' : Processes_Suite.desk_accessory_process,
'disk' : Disk_Folder_File_Suite.disk,
'document' : Standard_Suite.document,
'file' : Disk_Folder_File_Suite.file,
'folder' : Disk_Folder_File_Suite.folder,
'folder_action' : Folder_Actions_Suite.folder_action,
'item' : Disk_Folder_File_Suite.item,
'login_item' : Login_Items_Suite.login_item,
'process' : Processes_Suite.process,
'window' : Standard_Suite.window,
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
}
_propdeclarations = {
'c@#^' : _Prop__3c_Inheritance_3e_,
'faen' : _Prop_folder_actions_enabled,
'pALL' : _Prop_properties,
}
_compdeclarations = {
}
_enumdeclarations = {
}
--- NEW FILE: Processes_Suite.py ---
"""Suite Processes Suite: Terms and Events for controlling Processes
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 = 'prcs'
class Processes_Suite_Events:
pass
class application(aetools.ComponentItem):
"""application - The Processes Suite host program """
want = 'capp'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - All of the properties of the superclass. """
which = 'c@#^'
want = 'capp'
_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
class _Prop_folder_actions_enabled(aetools.NProperty):
"""folder actions enabled - Are Folder Actions currently being processed? """
which = 'faen'
want = 'bool'
folder_actions_enabled = _Prop_folder_actions_enabled()
class _Prop_properties(aetools.NProperty):
"""properties - every property of the Processes Suite host program """
which = 'pALL'
want = '****'
properties = _Prop_properties()
# element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
# 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
class application_process(aetools.ComponentItem):
"""application process - A process launched from an application file """
want = 'pcap'
class _Prop_application_file(aetools.NProperty):
"""application file - a reference to the application file from which this process was launched """
which = 'appf'
want = '****'
application_processes = application_process
class desk_accessory_process(aetools.ComponentItem):
"""desk accessory process - A process launched from an desk accessory file """
want = 'pcda'
class _Prop_desk_accessory_file(aetools.NProperty):
"""desk accessory file - a reference to the desk accessory file from which this process was launched """
which = 'dafi'
want = '****'
desk_accessory_processes = desk_accessory_process
class process(aetools.ComponentItem):
"""process - A process running on this computer """
want = 'prcs'
class _Prop_accepts_high_level_events(aetools.NProperty):
"""accepts high level events - Is the process high-level event aware (accepts open application, open document, print document, and quit)? """
which = 'isab'
want = 'bool'
class _Prop_accepts_remote_events(aetools.NProperty):
"""accepts remote events - Does the process accept remote events? """
which = 'revt'
want = 'bool'
class _Prop_classic(aetools.NProperty):
"""classic - Is the process running in the Classic environment? """
which = 'clsc'
want = 'bool'
class _Prop_creator_type(aetools.NProperty):
"""creator type - the OSType of the creator of the process (the signature) """
which = 'fcrt'
want = 'utxt'
class _Prop_file(aetools.NProperty):
"""file - the file from which the process was launched """
which = 'file'
want = '****'
class _Prop_file_type(aetools.NProperty):
"""file type - the OSType of the file type of the process """
which = 'asty'
want = 'utxt'
class _Prop_frontmost(aetools.NProperty):
"""frontmost - Is the process the frontmost process """
which = 'pisf'
want = 'bool'
class _Prop_has_scripting_terminology(aetools.NProperty):
"""has scripting terminology - Does the process have a scripting terminology, i.e., can it be scripted? """
which = 'hscr'
want = 'bool'
class _Prop_name(aetools.NProperty):
"""name - the name of the process """
which = 'pnam'
want = 'utxt'
class _Prop_partition_space_used(aetools.NProperty):
"""partition space used - the number of bytes currently used in the process' partition """
which = 'pusd'
want = 'magn'
class _Prop_total_partition_size(aetools.NProperty):
"""total partition size - the size of the partition with which the process was launched """
which = 'appt'
want = 'magn'
class _Prop_visible(aetools.NProperty):
"""visible - Is the process' layer visible? """
which = 'pvis'
want = 'bool'
processes = process
application._superclassnames = []
import Disk_Folder_File_Suite
import Standard_Suite
import Folder_Actions_Suite
import Login_Items_Suite
application._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'folder_actions_enabled' : _Prop_folder_actions_enabled,
'properties' : _Prop_properties,
}
application._privelemdict = {
'application_process' : application_process,
'desk_accessory_process' : desk_accessory_process,
'disk' : Disk_Folder_File_Suite.disk,
'document' : Standard_Suite.document,
'file' : Disk_Folder_File_Suite.file,
'folder' : Disk_Folder_File_Suite.folder,
'folder_action' : Folder_Actions_Suite.folder_action,
'item' : Disk_Folder_File_Suite.item,
'login_item' : Login_Items_Suite.login_item,
'process' : process,
'window' : Standard_Suite.window,
}
application_process._superclassnames = ['process']
application_process._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'application_file' : _Prop_application_file,
}
application_process._privelemdict = {
}
desk_accessory_process._superclassnames = ['process']
desk_accessory_process._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'desk_accessory_file' : _Prop_desk_accessory_file,
}
desk_accessory_process._privelemdict = {
}
process._superclassnames = ['item']
process._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'accepts_high_level_events' : _Prop_accepts_high_level_events,
'accepts_remote_events' : _Prop_accepts_remote_events,
'classic' : _Prop_classic,
'creator_type' : _Prop_creator_type,
'file' : _Prop_file,
'file_type' : _Prop_file_type,
'frontmost' : _Prop_frontmost,
'has_scripting_terminology' : _Prop_has_scripting_terminology,
'name' : _Prop_name,
'partition_space_used' : _Prop_partition_space_used,
'properties' : _Prop_properties,
'total_partition_size' : _Prop_total_partition_size,
'visible' : _Prop_visible,
}
process._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
'pcap' : application_process,
'pcda' : desk_accessory_process,
'prcs' : process,
}
_propdeclarations = {
'appf' : _Prop_application_file,
'appt' : _Prop_total_partition_size,
'asty' : _Prop_file_type,
'c@#^' : _Prop__3c_Inheritance_3e_,
'clsc' : _Prop_classic,
'dafi' : _Prop_desk_accessory_file,
'faen' : _Prop_folder_actions_enabled,
'fcrt' : _Prop_creator_type,
'file' : _Prop_file,
'hscr' : _Prop_has_scripting_terminology,
'isab' : _Prop_accepts_high_level_events,
'pALL' : _Prop_properties,
'pisf' : _Prop_frontmost,
'pnam' : _Prop_name,
'pusd' : _Prop_partition_space_used,
'pvis' : _Prop_visible,
'revt' : _Prop_accepts_remote_events,
}
_compdeclarations = {
}
_enumdeclarations = {
}
--- NEW FILE: Standard_Suite.py ---
"""Suite Standard Suite: Common classes and commands for most applications.
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 = '????'
class Standard_Suite_Events:
_argmap_close = {
'saving_in' : 'kfil',
'saving' : 'savo',
}
def close(self, _object, _attributes={}, **_arguments):
"""close: Close an object.
Required argument: the object for the command
Keyword argument saving_in: The file in which to save the object.
Keyword argument saving: Specifies whether changes should be saved before closing.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'core'
_subcode = 'clos'
aetools.keysubst(_arguments, self._argmap_close)
_arguments['----'] = _object
aetools.enumsubst(_arguments, 'savo', _Enum_savo)
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_count = {
'each' : 'kocl',
}
def count(self, _object, _attributes={}, **_arguments):
"""count: Return the number of elements of a particular class within an object.
Required argument: the object for the command
Keyword argument each: The class of objects to be counted.
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'core'
_subcode = 'cnte'
aetools.keysubst(_arguments, self._argmap_count)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
def delete(self, _object, _attributes={}, **_arguments):
"""delete: Delete an object.
Required argument: the object for the command
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'core'
_subcode = 'delo'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_duplicate = {
'to' : 'insh',
'with_properties' : 'prdt',
}
def duplicate(self, _object, _attributes={}, **_arguments):
"""duplicate: Copy object(s) and put the copies at a new location.
Required argument: the object for the command
Keyword argument to: The location for the new object(s).
Keyword argument with_properties: Properties to be set in the new duplicated object(s).
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'core'
_subcode = 'clon'
aetools.keysubst(_arguments, self._argmap_duplicate)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
def exists(self, _object, _attributes={}, **_arguments):
"""exists: Verify if an object exists.
Required argument: the object for the command
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'core'
_subcode = 'doex'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
def get(self, _object, _attributes={}, **_arguments):
"""get: Get the data for an object.
Required argument: the object for the command
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'core'
_subcode = 'getd'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_make = {
'at' : 'insh',
'new' : 'kocl',
'with_data' : 'data',
'with_properties' : 'prdt',
}
def make(self, _no_object=None, _attributes={}, **_arguments):
"""make: Make a new object.
Keyword argument at: The location at which to insert the object.
Keyword argument new: The class of the new object.
Keyword argument with_data: The initial data for the object.
Keyword argument with_properties: The initial values for properties of the object.
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'core'
_subcode = 'crel'
aetools.keysubst(_arguments, self._argmap_make)
if _no_object != None: raise TypeError, 'No direct arg expected'
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_move = {
'to' : 'insh',
}
def move(self, _object, _attributes={}, **_arguments):
"""move: Move object(s) to a new location.
Required argument: the object for the command
Keyword argument to: The new location for the object(s).
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'core'
_subcode = 'move'
aetools.keysubst(_arguments, self._argmap_move)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
def open(self, _object=None, _attributes={}, **_arguments):
"""open: Open an object.
Required argument: list of objects
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'odoc'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
def print_(self, _object=None, _attributes={}, **_arguments):
"""print: Print an object.
Required argument: list of objects
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'pdoc'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_quit = {
'saving' : 'savo',
}
def quit(self, _object, _attributes={}, **_arguments):
"""quit: Quit an application.
Required argument: the object for the command
Keyword argument saving: Specifies whether changes should be saved before quitting.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'quit'
aetools.keysubst(_arguments, self._argmap_quit)
_arguments['----'] = _object
aetools.enumsubst(_arguments, 'savo', _Enum_savo)
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_save = {
'in_' : 'kfil',
'as' : 'fltp',
}
def save(self, _object, _attributes={}, **_arguments):
"""save: Save an object.
Required argument: the object for the command
Keyword argument in_: The file in which to save the object.
Keyword argument as: The file type in which to save the data.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'core'
_subcode = 'save'
aetools.keysubst(_arguments, self._argmap_save)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
_argmap_set = {
'to' : 'data',
}
def set(self, _object, _attributes={}, **_arguments):
"""set: Set an object's data.
Required argument: the object for the command
Keyword argument to: The new value.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'core'
_subcode = 'setd'
aetools.keysubst(_arguments, self._argmap_set)
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
class application(aetools.ComponentItem):
"""application - An application's top level scripting object. """
want = 'capp'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - All of the properties of the superclass. """
which = 'c@#^'
want = 'cobj'
_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
class _Prop_frontmost(aetools.NProperty):
"""frontmost - Is this the frontmost (active) application? """
which = 'pisf'
want = 'bool'
frontmost = _Prop_frontmost()
class _Prop_name(aetools.NProperty):
"""name - The name of the application. """
which = 'pnam'
want = 'utxt'
name = _Prop_name()
class _Prop_version(aetools.NProperty):
"""version - The version of the application. """
which = 'vers'
want = 'utxt'
version = _Prop_version()
# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
# element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
applications = application
class item(aetools.ComponentItem):
"""item - A scriptable object. """
want = 'cobj'
class _Prop_class_(aetools.NProperty):
"""class - The class of the object. """
which = 'pcls'
want = 'type'
class _Prop_properties(aetools.NProperty):
"""properties - All of the object's properties. """
which = 'pALL'
want = 'reco'
items = item
class color(aetools.ComponentItem):
"""color - A color. """
want = 'colr'
colors = color
class window(aetools.ComponentItem):
"""window - A window. """
want = 'cwin'
class _Prop_bounds(aetools.NProperty):
"""bounds - The bounding rectangle of the window. """
which = 'pbnd'
want = 'qdrt'
class _Prop_closeable(aetools.NProperty):
"""closeable - Whether the window has a close box. """
which = 'hclb'
want = 'bool'
class _Prop_document(aetools.NProperty):
"""document - The document whose contents are being displayed in the window. """
which = 'docu'
want = 'docu'
class _Prop_floating(aetools.NProperty):
"""floating - Whether the window floats. """
which = 'isfl'
want = 'bool'
class _Prop_id(aetools.NProperty):
"""id - The unique identifier of the window. """
which = 'ID '
want = 'long'
class _Prop_index(aetools.NProperty):
"""index - The index of the window in the back-to-front window ordering. """
which = 'pidx'
want = 'long'
class _Prop_miniaturizable(aetools.NProperty):
"""miniaturizable - Whether the window can be miniaturized. """
which = 'ismn'
want = 'bool'
class _Prop_miniaturized(aetools.NProperty):
"""miniaturized - Whether the window is currently miniaturized. """
which = 'pmnd'
want = 'bool'
class _Prop_modal(aetools.NProperty):
"""modal - Whether the window is the application's current modal window. """
which = 'pmod'
want = 'bool'
class _Prop_resizable(aetools.NProperty):
"""resizable - Whether the window can be resized. """
which = 'prsz'
want = 'bool'
class _Prop_titled(aetools.NProperty):
"""titled - Whether the window has a title bar. """
which = 'ptit'
want = 'bool'
class _Prop_visible(aetools.NProperty):
"""visible - Whether the window is currently visible. """
which = 'pvis'
want = 'bool'
class _Prop_zoomable(aetools.NProperty):
"""zoomable - Whether the window can be zoomed. """
which = 'iszm'
want = 'bool'
class _Prop_zoomed(aetools.NProperty):
"""zoomed - Whether the window is currently zoomed. """
which = 'pzum'
want = 'bool'
windows = window
class document(aetools.ComponentItem):
"""document - A document. """
want = 'docu'
class _Prop_modified(aetools.NProperty):
"""modified - Has the document been modified since the last save? """
which = 'imod'
want = 'bool'
class _Prop_path(aetools.NProperty):
"""path - The document's path. """
which = 'ppth'
want = 'utxt'
documents = document
application._superclassnames = ['item']
application._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'frontmost' : _Prop_frontmost,
'name' : _Prop_name,
'version' : _Prop_version,
}
application._privelemdict = {
'document' : document,
'window' : window,
}
item._superclassnames = []
item._privpropdict = {
'class_' : _Prop_class_,
'properties' : _Prop_properties,
}
item._privelemdict = {
}
color._superclassnames = ['item']
color._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
}
color._privelemdict = {
}
window._superclassnames = ['item']
window._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'bounds' : _Prop_bounds,
'closeable' : _Prop_closeable,
'document' : _Prop_document,
'floating' : _Prop_floating,
'id' : _Prop_id,
'index' : _Prop_index,
'miniaturizable' : _Prop_miniaturizable,
'miniaturized' : _Prop_miniaturized,
'modal' : _Prop_modal,
'name' : _Prop_name,
'resizable' : _Prop_resizable,
'titled' : _Prop_titled,
'visible' : _Prop_visible,
'zoomable' : _Prop_zoomable,
'zoomed' : _Prop_zoomed,
}
window._privelemdict = {
}
document._superclassnames = ['item']
document._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'modified' : _Prop_modified,
'name' : _Prop_name,
'path' : _Prop_path,
}
document._privelemdict = {
}
class _3c_(aetools.NComparison):
"""< - Less than """
class _3d_(aetools.NComparison):
"""= - Equal """
class _3e_(aetools.NComparison):
"""> - Greater than """
class contains(aetools.NComparison):
"""contains - Contains """
class ends_with(aetools.NComparison):
"""ends with - Ends with """
class starts_with(aetools.NComparison):
"""starts with - Starts with """
class _b2_(aetools.NComparison):
"""\xb2 - Less than or equal to """
class _b3_(aetools.NComparison):
"""\xb3 - Greater than or equal to """
_Enum_savo = {
'ask' : 'ask ', # Ask the user whether or not to save the file.
'yes' : 'yes ', # Save the file.
'no' : 'no ', # Do not save the file.
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
'cobj' : item,
'colr' : color,
'cwin' : window,
'docu' : document,
}
_propdeclarations = {
'ID ' : _Prop_id,
'c@#^' : _Prop__3c_Inheritance_3e_,
'docu' : _Prop_document,
'hclb' : _Prop_closeable,
'imod' : _Prop_modified,
'isfl' : _Prop_floating,
'ismn' : _Prop_miniaturizable,
'iszm' : _Prop_zoomable,
'pALL' : _Prop_properties,
'pbnd' : _Prop_bounds,
'pcls' : _Prop_class_,
'pidx' : _Prop_index,
'pisf' : _Prop_frontmost,
'pmnd' : _Prop_miniaturized,
'pmod' : _Prop_modal,
'pnam' : _Prop_name,
'ppth' : _Prop_path,
'prsz' : _Prop_resizable,
'ptit' : _Prop_titled,
'pvis' : _Prop_visible,
'pzum' : _Prop_zoomed,
'vers' : _Prop_version,
}
_compdeclarations = {
'< ' : _3c_,
'<= ' : _b2_,
'= ' : _3d_,
'> ' : _3e_,
'>= ' : _b3_,
'bgwt' : starts_with,
'cont' : contains,
'ends' : ends_with,
}
_enumdeclarations = {
'savo' : _Enum_savo,
}
--- NEW FILE: System_Events_Suite.py ---
"""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:
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'
if _arguments: raise TypeError, 'No optional args expected'
_arguments['----'] = _object
_reply, _arguments, _attributes = self.send(_code, _subcode,
_arguments, _attributes)
if _arguments.get('errn', 0):
raise aetools.Error, aetools.decodeerror(_arguments)
# XXXX Optionally decode result
if _arguments.has_key('----'):
return _arguments['----']
class application(aetools.ComponentItem):
"""application - The System Events application """
want = 'capp'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - All of the properties of the superclass. """
which = 'c@#^'
want = 'capp'
_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
class _Prop_folder_actions_enabled(aetools.NProperty):
"""folder actions enabled - Are Folder Actions currently being processed? """
which = 'faen'
want = 'bool'
folder_actions_enabled = _Prop_folder_actions_enabled()
class _Prop_properties(aetools.NProperty):
"""properties - every property of the System Events application """
which = 'pALL'
want = '****'
properties = _Prop_properties()
# element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
# 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 = []
import Disk_Folder_File_Suite
import Standard_Suite
import Folder_Actions_Suite
import Login_Items_Suite
import Processes_Suite
application._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'folder_actions_enabled' : _Prop_folder_actions_enabled,
'properties' : _Prop_properties,
}
application._privelemdict = {
'application_process' : Processes_Suite.application_process,
'desk_accessory_process' : Processes_Suite.desk_accessory_process,
'disk' : Disk_Folder_File_Suite.disk,
'document' : Standard_Suite.document,
'file' : Disk_Folder_File_Suite.file,
'folder' : Disk_Folder_File_Suite.folder,
'folder_action' : Folder_Actions_Suite.folder_action,
'item' : Disk_Folder_File_Suite.item,
'login_item' : Login_Items_Suite.login_item,
'process' : Processes_Suite.process,
'window' : Standard_Suite.window,
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
}
_propdeclarations = {
'c@#^' : _Prop__3c_Inheritance_3e_,
'faen' : _Prop_folder_actions_enabled,
'pALL' : _Prop_properties,
}
_compdeclarations = {
}
_enumdeclarations = {
}
--- NEW FILE: Text_Suite.py ---
"""Suite Text Suite: A set of basic classes for text processing.
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 = '????'
class Text_Suite_Events:
pass
class attachment(aetools.ComponentItem):
"""attachment - Represents an inline text attachment. This class is used mainly for make commands. """
want = 'atts'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - All of the properties of the superclass. """
which = 'c@#^'
want = 'ctxt'
class _Prop_file_name(aetools.NProperty):
"""file name - The path to the file for the attachment """
which = 'atfn'
want = 'utxt'
# element 'catr' as ['indx', 'rele', 'rang', 'test']
# element 'cha ' as ['indx', 'rele', 'rang', 'test']
# element 'cpar' as ['indx', 'rele', 'rang', 'test']
# element 'cwor' as ['indx', 'rele', 'rang', 'test']
class attribute_run(aetools.ComponentItem):
"""attribute run - This subdivides the text into chunks that all have the same attributes. """
want = 'catr'
class _Prop_color(aetools.NProperty):
"""color - The color of the first character. """
which = 'colr'
want = 'colr'
class _Prop_font(aetools.NProperty):
"""font - The name of the font of the first character. """
which = 'font'
want = 'utxt'
class _Prop_size(aetools.NProperty):
"""size - The size in points of the first character. """
which = 'ptsz'
want = 'long'
# element 'catr' as ['indx', 'rele', 'rang', 'test']
# element 'cha ' as ['indx', 'rele', 'rang', 'test']
# element 'cpar' as ['indx', 'rele', 'rang', 'test']
# element 'cwor' as ['indx', 'rele', 'rang', 'test']
attribute_runs = attribute_run
class character(aetools.ComponentItem):
"""character - This subdivides the text into characters. """
want = 'cha '
# element 'catr' as ['indx', 'rele', 'rang', 'test']
# element 'cha ' as ['indx', 'rele', 'rang', 'test']
# element 'cpar' as ['indx', 'rele', 'rang', 'test']
# element 'cwor' as ['indx', 'rele', 'rang', 'test']
characters = character
class paragraph(aetools.ComponentItem):
"""paragraph - This subdivides the text into paragraphs. """
want = 'cpar'
# element 'catr' as ['indx', 'rele', 'rang', 'test']
# element 'cha ' as ['indx', 'rele', 'rang', 'test']
# element 'cpar' as ['indx', 'rele', 'rang', 'test']
# element 'cwor' as ['indx', 'rele', 'rang', 'test']
paragraphs = paragraph
class text(aetools.ComponentItem):
"""text - Rich (styled) text """
want = 'ctxt'
# element 'catr' as ['indx', 'rele', 'rang', 'test']
# element 'cha ' as ['indx', 'rele', 'rang', 'test']
# element 'cpar' as ['indx', 'rele', 'rang', 'test']
# element 'cwor' as ['indx', 'rele', 'rang', 'test']
class word(aetools.ComponentItem):
"""word - This subdivides the text into words. """
want = 'cwor'
# element 'catr' as ['indx', 'rele', 'rang', 'test']
# element 'cha ' as ['indx', 'rele', 'rang', 'test']
# element 'cpar' as ['indx', 'rele', 'rang', 'test']
# element 'cwor' as ['indx', 'rele', 'rang', 'test']
words = word
attachment._superclassnames = ['text']
attachment._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'file_name' : _Prop_file_name,
}
attachment._privelemdict = {
'attribute_run' : attribute_run,
'character' : character,
'paragraph' : paragraph,
'word' : word,
}
import Standard_Suite
attribute_run._superclassnames = ['item']
attribute_run._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'color' : _Prop_color,
'font' : _Prop_font,
'size' : _Prop_size,
}
attribute_run._privelemdict = {
'attribute_run' : attribute_run,
'character' : character,
'paragraph' : paragraph,
'word' : word,
}
character._superclassnames = ['item']
character._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'color' : _Prop_color,
'font' : _Prop_font,
'size' : _Prop_size,
}
character._privelemdict = {
'attribute_run' : attribute_run,
'character' : character,
'paragraph' : paragraph,
'word' : word,
}
paragraph._superclassnames = ['item']
paragraph._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'color' : _Prop_color,
'font' : _Prop_font,
'size' : _Prop_size,
}
paragraph._privelemdict = {
'attribute_run' : attribute_run,
'character' : character,
'paragraph' : paragraph,
'word' : word,
}
text._superclassnames = ['item']
text._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'color' : _Prop_color,
'font' : _Prop_font,
'size' : _Prop_size,
}
text._privelemdict = {
'attribute_run' : attribute_run,
'character' : character,
'paragraph' : paragraph,
'word' : word,
}
word._superclassnames = ['item']
word._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'color' : _Prop_color,
'font' : _Prop_font,
'size' : _Prop_size,
}
word._privelemdict = {
'attribute_run' : attribute_run,
'character' : character,
'paragraph' : paragraph,
'word' : word,
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'atts' : attachment,
'catr' : attribute_run,
'cha ' : character,
'cpar' : paragraph,
'ctxt' : text,
'cwor' : word,
}
_propdeclarations = {
'atfn' : _Prop_file_name,
'c@#^' : _Prop__3c_Inheritance_3e_,
'colr' : _Prop_color,
'font' : _Prop_font,
'ptsz' : _Prop_size,
}
_compdeclarations = {
}
_enumdeclarations = {
}
--- NEW FILE: __init__.py ---
"""
Package generated from /System/Library/CoreServices/System Events.app
"""
import aetools
Error = aetools.Error
import Standard_Suite
import Text_Suite
import Disk_Folder_File_Suite
import Folder_Actions_Suite
import Login_Items_Suite
import Power_Suite
import Processes_Suite
import System_Events_Suite
_code_to_module = {
'????' : Standard_Suite,
'????' : Text_Suite,
'cdis' : Disk_Folder_File_Suite,
'faco' : Folder_Actions_Suite,
'logi' : Login_Items_Suite,
'powr' : Power_Suite,
'prcs' : Processes_Suite,
'sevs' : System_Events_Suite,
}
_code_to_fullname = {
'????' : ('SystemEvents.Standard_Suite', 'Standard_Suite'),
'????' : ('SystemEvents.Text_Suite', 'Text_Suite'),
'cdis' : ('SystemEvents.Disk_Folder_File_Suite', 'Disk_Folder_File_Suite'),
'faco' : ('SystemEvents.Folder_Actions_Suite', 'Folder_Actions_Suite'),
'logi' : ('SystemEvents.Login_Items_Suite', 'Login_Items_Suite'),
'powr' : ('SystemEvents.Power_Suite', 'Power_Suite'),
'prcs' : ('SystemEvents.Processes_Suite', 'Processes_Suite'),
'sevs' : ('SystemEvents.System_Events_Suite', 'System_Events_Suite'),
}
from Standard_Suite import *
from Text_Suite import *
from Disk_Folder_File_Suite import *
from Folder_Actions_Suite import *
from Login_Items_Suite import *
from Power_Suite import *
from Processes_Suite import *
from System_Events_Suite import *
def getbaseclasses(v):
if not getattr(v, '_propdict', None):
v._propdict = {}
v._elemdict = {}
for superclassname in getattr(v, '_superclassnames', []):
superclass = eval(superclassname)
getbaseclasses(superclass)
v._propdict.update(getattr(superclass, '_propdict', {}))
v._elemdict.update(getattr(superclass, '_elemdict', {}))
v._propdict.update(getattr(v, '_privpropdict', {}))
v._elemdict.update(getattr(v, '_privelemdict', {}))
import StdSuites
#
# Set property and element dictionaries now that all classes have been defined
#
getbaseclasses(login_item)
getbaseclasses(color)
getbaseclasses(window)
getbaseclasses(application)
getbaseclasses(item)
getbaseclasses(document)
getbaseclasses(character)
getbaseclasses(attachment)
getbaseclasses(paragraph)
getbaseclasses(word)
getbaseclasses(attribute_run)
getbaseclasses(text)
getbaseclasses(file)
getbaseclasses(application)
getbaseclasses(item)
getbaseclasses(folder)
getbaseclasses(disk)
getbaseclasses(script)
getbaseclasses(application)
getbaseclasses(folder_action)
getbaseclasses(application)
getbaseclasses(application)
getbaseclasses(process)
getbaseclasses(application_process)
getbaseclasses(desk_accessory_process)
getbaseclasses(application)
#
# Indices of types declared in this module
#
_classdeclarations = {
'logi' : login_item,
'colr' : color,
'cwin' : window,
'capp' : application,
'cobj' : item,
'docu' : document,
'cha ' : character,
'atts' : attachment,
'cpar' : paragraph,
'cwor' : word,
'catr' : attribute_run,
'ctxt' : text,
'file' : file,
'capp' : application,
'cobj' : item,
'cfol' : folder,
'cdis' : disk,
'scpt' : script,
'capp' : application,
'foac' : folder_action,
'capp' : application,
'capp' : application,
'prcs' : process,
'pcap' : application_process,
'pcda' : desk_accessory_process,
'capp' : application,
}
class SystemEvents(Standard_Suite_Events,
Text_Suite_Events,
Disk_Folder_File_Suite_Events,
Folder_Actions_Suite_Events,
Login_Items_Suite_Events,
Power_Suite_Events,
Processes_Suite_Events,
System_Events_Suite_Events,
aetools.TalkTo):
_signature = 'sevs'
_moduleName = 'SystemEvents'
_elemdict = application._elemdict
_propdict = application._propdict
_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins
- Previous message: [Stackless-checkins] CVS: slpdev/src/2.2/src/Lib/plat-mac/lib-scriptpackages/StdSuites AppleScript_Suite.py, NONE, 1.1 Macintosh_Connectivity_Clas.py, NONE, 1.1 QuickDraw_Graphics_Suite.py, NONE, 1.1 QuickDraw_Graphics_Suppleme.py, NONE, 1.1 Required_Suite.py, NONE, 1.1 Standard_Suite.py, NONE, 1.1 Table_Suite.py, NONE, 1.1 Text_Suite.py, NONE, 1.1 Type_Names_Suite.py, NONE, 1.1 __init__.py, NONE, 1.1
- Next message: [Stackless-checkins] CVS: slpdev/src/2.2/src/Lib/plat-mac/lib-scriptpackages/Terminal Standard_Suite.py, NONE, 1.1 Terminal_Suite.py, NONE, 1.1 Text_Suite.py, NONE, 1.1 __init__.py, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Stackless-checkins
mailing list