Import Upstream version 2.7.18

This commit is contained in:
geos_one
2025-08-15 16:28:06 +02:00
commit ba1f69ab39
4521 changed files with 1778434 additions and 0 deletions

View File

@@ -0,0 +1,682 @@
"""Suite CodeWarrior suite: Terms for scripting the CodeWarrior IDE
Level 0, version 0
Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'CWIE'
class CodeWarrior_suite_Events:
_argmap_add = {
'new' : 'kocl',
'with_data' : 'data',
'to_targets' : 'TTGT',
'to_group' : 'TGRP',
}
def add(self, _object, _attributes={}, **_arguments):
"""add: add elements to a project or target
Required argument: an AE object reference
Keyword argument new: the class of the new element or elements to add
Keyword argument with_data: the initial data for the element or elements
Keyword argument to_targets: the targets to which the new element or elements will be added
Keyword argument to_group: the group to which the new element or elements will be added
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'ADDF'
aetools.keysubst(_arguments, self._argmap_add)
_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 build(self, _no_object=None, _attributes={}, **_arguments):
"""build: build a project or target (equivalent of the Make menu command)
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'MAKE'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def check(self, _object=None, _attributes={}, **_arguments):
"""check: check the syntax of a file in a project or target
Required argument: the file or files to be checked
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'CHEK'
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 compile_file(self, _object=None, _attributes={}, **_arguments):
"""compile file: compile a file in a project or target
Required argument: the file or files to be compiled
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'COMP'
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 disassemble_file(self, _object=None, _attributes={}, **_arguments):
"""disassemble file: disassemble a file in a project or target
Required argument: the file or files to be disassembled
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'DASM'
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_export = {
'in_' : 'kfil',
}
def export(self, _no_object=None, _attributes={}, **_arguments):
"""export: Export the project file as an XML file
Keyword argument in_: the XML file in which to export the project
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'EXPT'
aetools.keysubst(_arguments, self._argmap_export)
if _no_object is not 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['----']
def remove_object_code(self, _no_object=None, _attributes={}, **_arguments):
"""remove object code: remove object code from a project or target
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'RMOB'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def remove_target_files(self, _object, _attributes={}, **_arguments):
"""remove target files: remove files from a target
Required argument: an AE object reference
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'RMFL'
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 run_target(self, _no_object=None, _attributes={}, **_arguments):
"""run target: run a project or target
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'RUN '
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def touch_file(self, _object=None, _attributes={}, **_arguments):
"""touch file: touch a file in a project or target for compilation
Required argument: the file or files to be touched
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'TOCH'
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 update(self, _no_object=None, _attributes={}, **_arguments):
"""update: bring a project or target up to date
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'CWIE'
_subcode = 'UP2D'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
class single_class_browser(aetools.ComponentItem):
"""single class browser - a single class browser """
want = '1BRW'
class _Prop_inherits(aetools.NProperty):
"""inherits - all properties and elements of the given class are inherited by this class. """
which = 'c@#^'
want = 'TXTD'
single_class_browsers = single_class_browser
class single_class_hierarchy(aetools.ComponentItem):
"""single class hierarchy - a single class hierarchy document """
want = '1HIR'
single_class_hierarchies = single_class_hierarchy
class class_browser(aetools.ComponentItem):
"""class browser - a class browser """
want = 'BROW'
class_browsers = class_browser
class file_compare_document(aetools.ComponentItem):
"""file compare document - a file compare document """
want = 'COMP'
file_compare_documents = file_compare_document
class catalog_document(aetools.ComponentItem):
"""catalog document - a browser catalog document """
want = 'CTLG'
catalog_documents = catalog_document
class editor_document(aetools.ComponentItem):
"""editor document - an editor document """
want = 'EDIT'
editor_documents = editor_document
class class_hierarchy(aetools.ComponentItem):
"""class hierarchy - a class hierarchy document """
want = 'HIER'
class_hierarchies = class_hierarchy
class project_inspector(aetools.ComponentItem):
"""project inspector - the project inspector """
want = 'INSP'
project_inspectors = project_inspector
class message_document(aetools.ComponentItem):
"""message document - a message document """
want = 'MSSG'
message_documents = message_document
class build_progress_document(aetools.ComponentItem):
"""build progress document - a build progress document """
want = 'PRGS'
build_progress_documents = build_progress_document
class project_document(aetools.ComponentItem):
"""project document - a project document """
want = 'PRJD'
class _Prop_current_target(aetools.NProperty):
"""current target - the current target """
which = 'CURT'
want = 'TRGT'
# element 'TRGT' as ['indx', 'name', 'test', 'rang']
project_documents = project_document
class subtarget(aetools.ComponentItem):
"""subtarget - a target that is prerequisite for another target """
want = 'SBTG'
class _Prop_link_against_output(aetools.NProperty):
"""link against output - is the output of this subtarget linked into its dependent target? """
which = 'LNKO'
want = 'bool'
class _Prop_target(aetools.NProperty):
"""target - the target that is dependent on this subtarget """
which = 'TrgT'
want = 'TRGT'
subtargets = subtarget
class target_file(aetools.ComponentItem):
"""target file - a source or header file in a target """
want = 'SRCF'
class _Prop_code_size(aetools.NProperty):
"""code size - the size of the code (in bytes) produced by compiling this source file """
which = 'CSZE'
want = 'long'
class _Prop_compiled_date(aetools.NProperty):
"""compiled date - the date and this source file was last compiled """
which = 'CMPD'
want = 'ldt '
class _Prop_data_size(aetools.NProperty):
"""data size - the size of the date (in bytes) produced by compiling this source file """
which = 'DSZE'
want = 'long'
class _Prop_debug(aetools.NProperty):
"""debug - is debugging information generated for this source file? """
which = 'DBUG'
want = 'bool'
class _Prop_dependents(aetools.NProperty):
"""dependents - the source files that need this source file in order to build """
which = 'DPND'
want = 'list'
class _Prop_id(aetools.NProperty):
"""id - the unique ID number of the target file """
which = 'ID '
want = 'long'
class _Prop_init_before(aetools.NProperty):
"""init before - is the \xd4initialize before\xd5 flag set for this shared library? """
which = 'INIT'
want = 'bool'
class _Prop_link_index(aetools.NProperty):
"""link index - the index of the source file in its target\xd5s link order (-1 if source file is not in link order) """
which = 'LIDX'
want = 'long'
class _Prop_linked(aetools.NProperty):
"""linked - is the source file in the link order of its target? """
which = 'LINK'
want = 'bool'
class _Prop_location(aetools.NProperty):
"""location - the location of the target file on disk """
which = 'FILE'
want = 'fss '
class _Prop_merge_output(aetools.NProperty):
"""merge output - is this shared library merged into another code fragment? """
which = 'MRGE'
want = 'bool'
class _Prop_modified_date(aetools.NProperty):
"""modified date - the date and time this source file was last modified """
which = 'MODD'
want = 'ldt '
class _Prop_path(aetools.NProperty):
"""path - the path of the source file on disk """
which = 'Path'
want = 'itxt'
class _Prop_prerequisites(aetools.NProperty):
"""prerequisites - the source files needed to build this source file """
which = 'PRER'
want = 'list'
class _Prop_type(aetools.NProperty):
"""type - the type of source file """
which = 'FTYP'
want = 'FTYP'
class _Prop_weak_link(aetools.NProperty):
"""weak link - is this shared library linked weakly? """
which = 'WEAK'
want = 'bool'
target_files = target_file
class symbol_browser(aetools.ComponentItem):
"""symbol browser - a symbol browser """
want = 'SYMB'
symbol_browsers = symbol_browser
class ToolServer_worksheet(aetools.ComponentItem):
"""ToolServer worksheet - a ToolServer worksheet """
want = 'TOOL'
ToolServer_worksheets = ToolServer_worksheet
class target(aetools.ComponentItem):
"""target - a target in a project """
want = 'TRGT'
class _Prop_name(aetools.NProperty):
"""name - """
which = 'pnam'
want = 'itxt'
class _Prop_project_document(aetools.NProperty):
"""project document - the project document that contains this target """
which = 'PrjD'
want = 'PRJD'
# element 'SBTG' as ['indx', 'test', 'rang']
# element 'SRCF' as ['indx', 'test', 'rang']
targets = target
class text_document(aetools.ComponentItem):
"""text document - a document that contains text """
want = 'TXTD'
class _Prop_modified(aetools.NProperty):
"""modified - Has the document been modified since the last save? """
which = 'imod'
want = 'bool'
class _Prop_selection(aetools.NProperty):
"""selection - the selection visible to the user """
which = 'sele'
want = 'csel'
# element 'cha ' as ['indx', 'rele', 'rang', 'test']
# element 'cins' as ['rele']
# element 'clin' as ['indx', 'rang', 'rele']
# element 'ctxt' as ['rang']
text_documents = text_document
single_class_browser._superclassnames = ['text_document']
single_class_browser._privpropdict = {
'inherits' : _Prop_inherits,
}
single_class_browser._privelemdict = {
}
import Standard_Suite
single_class_hierarchy._superclassnames = ['document']
single_class_hierarchy._privpropdict = {
'inherits' : _Prop_inherits,
}
single_class_hierarchy._privelemdict = {
}
class_browser._superclassnames = ['text_document']
class_browser._privpropdict = {
'inherits' : _Prop_inherits,
}
class_browser._privelemdict = {
}
file_compare_document._superclassnames = ['text_document']
file_compare_document._privpropdict = {
'inherits' : _Prop_inherits,
}
file_compare_document._privelemdict = {
}
catalog_document._superclassnames = ['text_document']
catalog_document._privpropdict = {
'inherits' : _Prop_inherits,
}
catalog_document._privelemdict = {
}
editor_document._superclassnames = ['text_document']
editor_document._privpropdict = {
'inherits' : _Prop_inherits,
}
editor_document._privelemdict = {
}
class_hierarchy._superclassnames = ['document']
class_hierarchy._privpropdict = {
'inherits' : _Prop_inherits,
}
class_hierarchy._privelemdict = {
}
project_inspector._superclassnames = ['document']
project_inspector._privpropdict = {
'inherits' : _Prop_inherits,
}
project_inspector._privelemdict = {
}
message_document._superclassnames = ['text_document']
message_document._privpropdict = {
'inherits' : _Prop_inherits,
}
message_document._privelemdict = {
}
build_progress_document._superclassnames = ['document']
build_progress_document._privpropdict = {
'inherits' : _Prop_inherits,
}
build_progress_document._privelemdict = {
}
project_document._superclassnames = ['document']
project_document._privpropdict = {
'current_target' : _Prop_current_target,
'inherits' : _Prop_inherits,
}
project_document._privelemdict = {
'target' : target,
}
subtarget._superclassnames = ['target']
subtarget._privpropdict = {
'inherits' : _Prop_inherits,
'link_against_output' : _Prop_link_against_output,
'target' : _Prop_target,
}
subtarget._privelemdict = {
}
target_file._superclassnames = []
target_file._privpropdict = {
'code_size' : _Prop_code_size,
'compiled_date' : _Prop_compiled_date,
'data_size' : _Prop_data_size,
'debug' : _Prop_debug,
'dependents' : _Prop_dependents,
'id' : _Prop_id,
'init_before' : _Prop_init_before,
'link_index' : _Prop_link_index,
'linked' : _Prop_linked,
'location' : _Prop_location,
'merge_output' : _Prop_merge_output,
'modified_date' : _Prop_modified_date,
'path' : _Prop_path,
'prerequisites' : _Prop_prerequisites,
'type' : _Prop_type,
'weak_link' : _Prop_weak_link,
}
target_file._privelemdict = {
}
symbol_browser._superclassnames = ['text_document']
symbol_browser._privpropdict = {
'inherits' : _Prop_inherits,
}
symbol_browser._privelemdict = {
}
ToolServer_worksheet._superclassnames = ['text_document']
ToolServer_worksheet._privpropdict = {
'inherits' : _Prop_inherits,
}
ToolServer_worksheet._privelemdict = {
}
target._superclassnames = []
target._privpropdict = {
'name' : _Prop_name,
'project_document' : _Prop_project_document,
}
target._privelemdict = {
'subtarget' : subtarget,
'target_file' : target_file,
}
text_document._superclassnames = ['document']
text_document._privpropdict = {
'inherits' : _Prop_inherits,
'modified' : _Prop_modified,
'selection' : _Prop_selection,
}
text_document._privelemdict = {
'character' : Standard_Suite.character,
'insertion_point' : Standard_Suite.insertion_point,
'line' : Standard_Suite.line,
'text' : Standard_Suite.text,
}
_Enum_DKND = {
'project' : 'PRJD', # a project document
'editor_document' : 'EDIT', # an editor document
'message' : 'MSSG', # a message document
'file_compare' : 'COMP', # a file compare document
'catalog_document' : 'CTLG', # a browser catalog
'class_browser' : 'BROW', # a class browser document
'single_class_browser' : '1BRW', # a single class browser document
'symbol_browser' : 'SYMB', # a symbol browser document
'class_hierarchy' : 'HIER', # a class hierarchy document
'single_class_hierarchy' : '1HIR', # a single class hierarchy document
'project_inspector' : 'INSP', # a project inspector
'ToolServer_worksheet' : 'TOOL', # the ToolServer worksheet
'build_progress_document' : 'PRGS', # the build progress window
}
_Enum_FTYP = {
'library_file' : 'LIBF', # a library file
'project_file' : 'PRJF', # a project file
'resource_file' : 'RESF', # a resource file
'text_file' : 'TXTF', # a text file
'unknown_file' : 'UNKN', # unknown file type
}
_Enum_Inte = {
'never_interact' : 'eNvr', # never allow user interactions
'interact_with_self' : 'eInS', # allow user interaction only when an AppleEvent is sent from within CodeWarrior
'interact_with_local' : 'eInL', # allow user interaction when AppleEvents are sent from applications on the same machine (default)
'interact_with_all' : 'eInA', # allow user interaction from both local and remote AppleEvents
}
_Enum_PERM = {
'read_write' : 'RdWr', # the file is open with read/write permission
'read_only' : 'Read', # the file is open with read/only permission
'checked_out_read_write' : 'CkRW', # the file is checked out with read/write permission
'checked_out_read_only' : 'CkRO', # the file is checked out with read/only permission
'checked_out_read_modify' : 'CkRM', # the file is checked out with read/modify permission
'locked' : 'Lock', # the file is locked on disk
'none' : 'LNNO', # the file is new
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'1BRW' : single_class_browser,
'1HIR' : single_class_hierarchy,
'BROW' : class_browser,
'COMP' : file_compare_document,
'CTLG' : catalog_document,
'EDIT' : editor_document,
'HIER' : class_hierarchy,
'INSP' : project_inspector,
'MSSG' : message_document,
'PRGS' : build_progress_document,
'PRJD' : project_document,
'SBTG' : subtarget,
'SRCF' : target_file,
'SYMB' : symbol_browser,
'TOOL' : ToolServer_worksheet,
'TRGT' : target,
'TXTD' : text_document,
}
_propdeclarations = {
'CMPD' : _Prop_compiled_date,
'CSZE' : _Prop_code_size,
'CURT' : _Prop_current_target,
'DBUG' : _Prop_debug,
'DPND' : _Prop_dependents,
'DSZE' : _Prop_data_size,
'FILE' : _Prop_location,
'FTYP' : _Prop_type,
'ID ' : _Prop_id,
'INIT' : _Prop_init_before,
'LIDX' : _Prop_link_index,
'LINK' : _Prop_linked,
'LNKO' : _Prop_link_against_output,
'MODD' : _Prop_modified_date,
'MRGE' : _Prop_merge_output,
'PRER' : _Prop_prerequisites,
'Path' : _Prop_path,
'PrjD' : _Prop_project_document,
'TrgT' : _Prop_target,
'WEAK' : _Prop_weak_link,
'c@#^' : _Prop_inherits,
'imod' : _Prop_modified,
'pnam' : _Prop_name,
'sele' : _Prop_selection,
}
_compdeclarations = {
}
_enumdeclarations = {
'DKND' : _Enum_DKND,
'FTYP' : _Enum_FTYP,
'Inte' : _Enum_Inte,
'PERM' : _Enum_PERM,
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
"""Suite Required: Terms that every application should support
Level 1, version 1
Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'reqd'
from StdSuites.Required_Suite import *
class Required_Events(Required_Suite_Events):
_argmap_open = {
'converting' : 'Conv',
}
def open(self, _object, _attributes={}, **_arguments):
"""open: Open the specified object(s)
Required argument: list of objects to open
Keyword argument converting: Whether to convert project to latest version (yes/no; default is ask).
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'odoc'
aetools.keysubst(_arguments, self._argmap_open)
_arguments['----'] = _object
aetools.enumsubst(_arguments, 'Conv', _Enum_Conv)
_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['----']
_Enum_Conv = {
'yes' : 'yes ', # Convert the project if necessary on open
'no' : 'no ', # Do not convert the project if needed on open
}
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
'Conv' : _Enum_Conv,
}

View File

@@ -0,0 +1,408 @@
"""Suite Standard Suite: Common terms for most applications
Level 1, version 1
Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'CoRe'
from StdSuites.Standard_Suite import *
class Standard_Suite_Events(Standard_Suite_Events):
_argmap_close = {
'saving' : 'savo',
'saving_in' : 'kfil',
}
def close(self, _object, _attributes={}, **_arguments):
"""close: close an object
Required argument: the object to close
Keyword argument saving: specifies whether or not changes should be saved before closing
Keyword argument saving_in: the file in which to save the object
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 whose elements are to be counted
Keyword argument each: the class of the elements to be counted. Keyword 'each' is optional in AppleScript
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the number of elements
"""
_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['----']
_argmap_get = {
'as' : 'rtyp',
}
def get(self, _object, _attributes={}, **_arguments):
"""get: get the data for an object
Required argument: the object whose data is to be returned
Keyword argument as: the desired types for the data, in order of preference
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: The data from the object
"""
_code = 'core'
_subcode = 'getd'
aetools.keysubst(_arguments, self._argmap_get)
_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 = {
'new' : 'kocl',
'as' : 'rtyp',
'at' : 'insh',
'with_data' : 'data',
'with_properties' : 'prdt',
}
def make(self, _no_object=None, _attributes={}, **_arguments):
"""make: make a new element
Keyword argument new: the class of the new element\xd1keyword 'new' is optional in AppleScript
Keyword argument as: the desired types for the data, in order of preference
Keyword argument at: the location at which to insert the element
Keyword argument with_data: the initial data for the element
Keyword argument with_properties: the initial values for the properties of the element
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: to the new object(s)
"""
_code = 'core'
_subcode = 'crel'
aetools.keysubst(_arguments, self._argmap_make)
if _no_object is not 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['----']
def select(self, _object=None, _attributes={}, **_arguments):
"""select: select the specified object
Required argument: the object to select
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'misc'
_subcode = 'slct'
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_set = {
'to' : 'data',
}
def set(self, _object, _attributes={}, **_arguments):
"""set: set an object's data
Required argument: the object to change
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 program """
want = 'capp'
class _Prop_user_interaction(aetools.NProperty):
"""user interaction - user interaction level """
which = 'inte'
want = 'Inte'
user_interaction = _Prop_user_interaction()
# element 'cwin' as ['indx', 'name', 'rang']
# element 'docu' as ['indx', 'name', 'rang']
class character(aetools.ComponentItem):
"""character - a character """
want = 'cha '
class _Prop_length(aetools.NProperty):
"""length - length in characters of this object """
which = 'pLen'
want = 'long'
class _Prop_offset(aetools.NProperty):
"""offset - offset of a text object from the beginning of the document (first char has offset 1) """
which = 'pOff'
want = 'long'
class insertion_point(aetools.ComponentItem):
"""insertion point - An insertion location between two objects """
want = 'cins'
class line(aetools.ComponentItem):
"""line - lines of text """
want = 'clin'
class _Prop_index(aetools.NProperty):
"""index - index of a line object from the beginning of the document (first line has index 1) """
which = 'pidx'
want = 'long'
# element 'cha ' as ['indx', 'rang', 'rele']
lines = line
class selection_2d_object(aetools.ComponentItem):
"""selection-object - the selection visible to the user """
want = 'csel'
class _Prop_contents(aetools.NProperty):
"""contents - the contents of the selection """
which = 'pcnt'
want = 'type'
# element 'cha ' as ['indx', 'rele', 'rang', 'test']
# element 'clin' as ['indx', 'rang', 'rele']
# element 'ctxt' as ['rang']
class text(aetools.ComponentItem):
"""text - Text """
want = 'ctxt'
# element 'cha ' as ['indx', 'rele', 'rang']
# element 'cins' as ['rele']
# element 'clin' as ['indx', 'rang', 'rele']
# element 'ctxt' as ['rang']
class window(aetools.ComponentItem):
"""window - A window """
want = 'cwin'
class _Prop_bounds(aetools.NProperty):
"""bounds - the boundary rectangle for the window """
which = 'pbnd'
want = 'qdrt'
class _Prop_document(aetools.NProperty):
"""document - the document that owns this window """
which = 'docu'
want = 'docu'
class _Prop_name(aetools.NProperty):
"""name - the title of the window """
which = 'pnam'
want = 'itxt'
class _Prop_position(aetools.NProperty):
"""position - upper left coordinates of window """
which = 'ppos'
want = 'QDpt'
class _Prop_visible(aetools.NProperty):
"""visible - is the window visible? """
which = 'pvis'
want = 'bool'
class _Prop_zoomed(aetools.NProperty):
"""zoomed - Is the window zoomed? """
which = 'pzum'
want = 'bool'
windows = window
class document(aetools.ComponentItem):
"""document - a document """
want = 'docu'
class _Prop_file_permissions(aetools.NProperty):
"""file permissions - the file permissions for the document """
which = 'PERM'
want = 'PERM'
class _Prop_kind(aetools.NProperty):
"""kind - the kind of document """
which = 'DKND'
want = 'DKND'
class _Prop_location(aetools.NProperty):
"""location - the file of the document """
which = 'FILE'
want = 'fss '
class _Prop_window(aetools.NProperty):
"""window - the window of the document. """
which = 'cwin'
want = 'cwin'
documents = document
class files(aetools.ComponentItem):
"""files - Every file """
want = 'file'
file = files
application._superclassnames = []
application._privpropdict = {
'user_interaction' : _Prop_user_interaction,
}
application._privelemdict = {
'document' : document,
'window' : window,
}
character._superclassnames = []
character._privpropdict = {
'length' : _Prop_length,
'offset' : _Prop_offset,
}
character._privelemdict = {
}
insertion_point._superclassnames = []
insertion_point._privpropdict = {
'length' : _Prop_length,
'offset' : _Prop_offset,
}
insertion_point._privelemdict = {
}
line._superclassnames = []
line._privpropdict = {
'index' : _Prop_index,
'length' : _Prop_length,
'offset' : _Prop_offset,
}
line._privelemdict = {
'character' : character,
}
selection_2d_object._superclassnames = []
selection_2d_object._privpropdict = {
'contents' : _Prop_contents,
'length' : _Prop_length,
'offset' : _Prop_offset,
}
selection_2d_object._privelemdict = {
'character' : character,
'line' : line,
'text' : text,
}
text._superclassnames = []
text._privpropdict = {
'length' : _Prop_length,
'offset' : _Prop_offset,
}
text._privelemdict = {
'character' : character,
'insertion_point' : insertion_point,
'line' : line,
'text' : text,
}
window._superclassnames = []
window._privpropdict = {
'bounds' : _Prop_bounds,
'document' : _Prop_document,
'index' : _Prop_index,
'name' : _Prop_name,
'position' : _Prop_position,
'visible' : _Prop_visible,
'zoomed' : _Prop_zoomed,
}
window._privelemdict = {
}
document._superclassnames = []
document._privpropdict = {
'file_permissions' : _Prop_file_permissions,
'index' : _Prop_index,
'kind' : _Prop_kind,
'location' : _Prop_location,
'name' : _Prop_name,
'window' : _Prop_window,
}
document._privelemdict = {
}
files._superclassnames = []
files._privpropdict = {
}
files._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
'cha ' : character,
'cins' : insertion_point,
'clin' : line,
'csel' : selection_2d_object,
'ctxt' : text,
'cwin' : window,
'docu' : document,
'file' : files,
}
_propdeclarations = {
'DKND' : _Prop_kind,
'FILE' : _Prop_location,
'PERM' : _Prop_file_permissions,
'cwin' : _Prop_window,
'docu' : _Prop_document,
'inte' : _Prop_user_interaction,
'pLen' : _Prop_length,
'pOff' : _Prop_offset,
'pbnd' : _Prop_bounds,
'pcnt' : _Prop_contents,
'pidx' : _Prop_index,
'pnam' : _Prop_name,
'ppos' : _Prop_position,
'pvis' : _Prop_visible,
'pzum' : _Prop_zoomed,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,193 @@
"""
Package generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the CodeWarrior package is removed.", stacklevel=2)
import aetools
Error = aetools.Error
import CodeWarrior_suite
import Standard_Suite
import Metrowerks_Shell_Suite
import Required
_code_to_module = {
'CWIE' : CodeWarrior_suite,
'CoRe' : Standard_Suite,
'MMPR' : Metrowerks_Shell_Suite,
'reqd' : Required,
}
_code_to_fullname = {
'CWIE' : ('CodeWarrior.CodeWarrior_suite', 'CodeWarrior_suite'),
'CoRe' : ('CodeWarrior.Standard_Suite', 'Standard_Suite'),
'MMPR' : ('CodeWarrior.Metrowerks_Shell_Suite', 'Metrowerks_Shell_Suite'),
'reqd' : ('CodeWarrior.Required', 'Required'),
}
from CodeWarrior_suite import *
from Standard_Suite import *
from Metrowerks_Shell_Suite import *
from Required 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(character)
getbaseclasses(selection_2d_object)
getbaseclasses(application)
getbaseclasses(document)
getbaseclasses(text)
getbaseclasses(window)
getbaseclasses(file)
getbaseclasses(line)
getbaseclasses(insertion_point)
getbaseclasses(single_class_browser)
getbaseclasses(project_document)
getbaseclasses(symbol_browser)
getbaseclasses(editor_document)
getbaseclasses(file_compare_document)
getbaseclasses(class_browser)
getbaseclasses(subtarget)
getbaseclasses(message_document)
getbaseclasses(project_inspector)
getbaseclasses(text_document)
getbaseclasses(catalog_document)
getbaseclasses(class_hierarchy)
getbaseclasses(target)
getbaseclasses(build_progress_document)
getbaseclasses(target_file)
getbaseclasses(ToolServer_worksheet)
getbaseclasses(single_class_hierarchy)
getbaseclasses(File_Mapping)
getbaseclasses(browser_catalog)
getbaseclasses(Build_Settings)
getbaseclasses(ProjectFile)
getbaseclasses(VCS_Setup)
getbaseclasses(data_member)
getbaseclasses(Shielded_Folder)
getbaseclasses(Custom_Keywords)
getbaseclasses(Path_Information)
getbaseclasses(Segment)
getbaseclasses(Source_Tree)
getbaseclasses(Access_Paths)
getbaseclasses(Debugger_Windowing)
getbaseclasses(Relative_Path)
getbaseclasses(Environment_Variable)
getbaseclasses(base_class)
getbaseclasses(Debugger_Display)
getbaseclasses(Build_Extras)
getbaseclasses(Error_Information)
getbaseclasses(Editor)
getbaseclasses(Shielded_Folders)
getbaseclasses(Extras)
getbaseclasses(File_Mappings)
getbaseclasses(Function_Information)
getbaseclasses(Debugger_Target)
getbaseclasses(Syntax_Coloring)
getbaseclasses(class_)
getbaseclasses(Global_Source_Trees)
getbaseclasses(Target_Settings)
getbaseclasses(Debugger_Global)
getbaseclasses(member_function)
getbaseclasses(Runtime_Settings)
getbaseclasses(Plugin_Settings)
getbaseclasses(Browser_Coloring)
getbaseclasses(Font)
getbaseclasses(Target_Source_Trees)
#
# Indices of types declared in this module
#
_classdeclarations = {
'cha ' : character,
'csel' : selection_2d_object,
'capp' : application,
'docu' : document,
'ctxt' : text,
'cwin' : window,
'file' : file,
'clin' : line,
'cins' : insertion_point,
'1BRW' : single_class_browser,
'PRJD' : project_document,
'SYMB' : symbol_browser,
'EDIT' : editor_document,
'COMP' : file_compare_document,
'BROW' : class_browser,
'SBTG' : subtarget,
'MSSG' : message_document,
'INSP' : project_inspector,
'TXTD' : text_document,
'CTLG' : catalog_document,
'HIER' : class_hierarchy,
'TRGT' : target,
'PRGS' : build_progress_document,
'SRCF' : target_file,
'TOOL' : ToolServer_worksheet,
'1HIR' : single_class_hierarchy,
'FMap' : File_Mapping,
'Cata' : browser_catalog,
'BSTG' : Build_Settings,
'SrcF' : ProjectFile,
'VCSs' : VCS_Setup,
'DtMb' : data_member,
'SFit' : Shielded_Folder,
'CUKW' : Custom_Keywords,
'PInf' : Path_Information,
'Seg ' : Segment,
'SrcT' : Source_Tree,
'PATH' : Access_Paths,
'DbWN' : Debugger_Windowing,
'RlPt' : Relative_Path,
'EnvV' : Environment_Variable,
'BsCl' : base_class,
'DbDS' : Debugger_Display,
'LXTR' : Build_Extras,
'ErrM' : Error_Information,
'EDTR' : Editor,
'SHFL' : Shielded_Folders,
'GXTR' : Extras,
'FLMP' : File_Mappings,
'FDef' : Function_Information,
'DbTG' : Debugger_Target,
'SNTX' : Syntax_Coloring,
'Clas' : class_,
'GSTs' : Global_Source_Trees,
'TARG' : Target_Settings,
'DbGL' : Debugger_Global,
'MbFn' : member_function,
'RSTG' : Runtime_Settings,
'PSTG' : Plugin_Settings,
'BRKW' : Browser_Coloring,
'mFNT' : Font,
'TSTs' : Target_Source_Trees,
}
class CodeWarrior(CodeWarrior_suite_Events,
Standard_Suite_Events,
Metrowerks_Shell_Suite_Events,
Required_Events,
aetools.TalkTo):
_signature = 'CWIE'
_moduleName = 'CodeWarrior'

View File

@@ -0,0 +1,96 @@
"""Suite Microsoft Internet Explorer Suite: Events defined by Internet Explorer
Level 1, version 1
Generated from /Applications/Internet Explorer.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'MSIE'
class Microsoft_Internet_Explorer_Events:
def GetSource(self, _object=None, _attributes={}, **_arguments):
"""GetSource: Get the HTML source of a browser window
Required argument: Window Identifier of window from which to get the source. No value means get the source from the frontmost window.
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: undocumented, typecode 'TEXT'
"""
_code = 'MSIE'
_subcode = 'SORC'
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 PrintBrowserWindow(self, _object=None, _attributes={}, **_arguments):
"""PrintBrowserWindow: Print contents of browser window (HTML)
Required argument: Window Identifier of the window to print. No value means print the frontmost browser window.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'misc'
_subcode = 'pWND'
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_script = {
'window' : 'WIND',
}
def do_script(self, _object, _attributes={}, **_arguments):
"""do script: Execute script commands
Required argument: JavaScript text to execute
Keyword argument window: optional Window Identifier (as supplied by the ListWindows event) specifying context in which to execute the script
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Return value
"""
_code = 'misc'
_subcode = 'dosc'
aetools.keysubst(_arguments, self._argmap_do_script)
_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 = {
}

View File

@@ -0,0 +1,49 @@
"""Suite Netscape Suite: Events defined by Netscape
Level 1, version 1
Generated from /Applications/Internet Explorer.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'MOSS'
class Netscape_Suite_Events:
def Open_bookmark(self, _object=None, _attributes={}, **_arguments):
"""Open bookmark: Opens a bookmark file
Required argument: If not available, reloads the current bookmark file
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'MOSS'
_subcode = 'book'
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 = {
}

View File

@@ -0,0 +1,108 @@
"""Suite Required Suite: Events that every application should support
Level 1, version 1
Generated from /Applications/Internet Explorer.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'reqd'
from StdSuites.Required_Suite import *
class Required_Suite_Events(Required_Suite_Events):
def open(self, _object, _attributes={}, **_arguments):
"""open: Open documents
Required argument: undocumented, typecode 'alis'
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, _attributes={}, **_arguments):
"""print: Print documents
Required argument: undocumented, typecode 'alis'
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['----']
def quit(self, _no_object=None, _attributes={}, **_arguments):
"""quit: Quit application
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'quit'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def run(self, _no_object=None, _attributes={}, **_arguments):
"""run:
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'oapp'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,72 @@
"""Suite Standard Suite: Common terms for most applications
Level 1, version 1
Generated from /Applications/Internet Explorer.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = '****'
class Standard_Suite_Events:
_argmap_get = {
'as' : 'rtyp',
}
def get(self, _object, _attributes={}, **_arguments):
"""get:
Required argument: an AE object reference
Keyword argument as: undocumented, typecode 'type'
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: anything
"""
_code = 'core'
_subcode = 'getd'
aetools.keysubst(_arguments, self._argmap_get)
_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 program """
want = 'capp'
class _Prop_selected_text(aetools.NProperty):
"""selected text - the selected text """
which = 'stxt'
want = 'TEXT'
selected_text = _Prop_selected_text()
application._superclassnames = []
application._privpropdict = {
'selected_text' : _Prop_selected_text,
}
application._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
}
_propdeclarations = {
'stxt' : _Prop_selected_text,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,54 @@
"""Suite URL Suite: Standard suite for Uniform Resource Locators
Level 1, version 1
Generated from /Applications/Internet Explorer.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'GURL'
class URL_Suite_Events:
_argmap_GetURL = {
'to' : 'dest',
}
def GetURL(self, _object, _attributes={}, **_arguments):
"""GetURL: Open the URL (and optionally save it to disk)
Required argument: URL to open
Keyword argument to: File into which to save resource located at URL.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'GURL'
_subcode = 'GURL'
aetools.keysubst(_arguments, self._argmap_GetURL)
_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 = {
}

View File

@@ -0,0 +1,226 @@
"""Suite Web Browser Suite: Class of events supported by Web Browser applications
Level 1, version 1
Generated from /Applications/Internet Explorer.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'WWW!'
class Web_Browser_Suite_Events:
def Activate(self, _object=None, _attributes={}, **_arguments):
"""Activate: Activate Internet Explorer and optionally select window designated by Window Identifier.
Required argument: Window Identifier
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Window Identifier of window to activate
"""
_code = 'WWW!'
_subcode = 'ACTV'
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 CloseAllWindows(self, _no_object=None, _attributes={}, **_arguments):
"""CloseAllWindows: Closes all windows
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Success
"""
_code = 'WWW!'
_subcode = 'CLSA'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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_CloseWindow = {
'ID' : 'WIND',
'Title' : 'TITL',
}
def CloseWindow(self, _no_object=None, _attributes={}, **_arguments):
"""CloseWindow: Close the window specified by either Window Identifier or Title. If no parameter is specified, close the top window.
Keyword argument ID: ID of the window to close. (Can use -1 for top window)
Keyword argument Title: Title of the window to close
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Success
"""
_code = 'WWW!'
_subcode = 'CLOS'
aetools.keysubst(_arguments, self._argmap_CloseWindow)
if _no_object is not 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['----']
def GetWindowInfo(self, _object, _attributes={}, **_arguments):
"""GetWindowInfo: Returns a window info record (URL/Title) for the specified window.
Required argument: Window Identifier of the window
Keyword argument _attributes: AppleEvent attribute dictionary
Returns:
"""
_code = 'WWW!'
_subcode = 'WNFO'
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 ListWindows(self, _no_object=None, _attributes={}, **_arguments):
"""ListWindows: Returns list of Window Identifiers for all open windows.
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: undocumented, typecode 'list'
"""
_code = 'WWW!'
_subcode = 'LSTW'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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_OpenURL = {
'to' : 'INTO',
'toWindow' : 'WIND',
'Flags' : 'FLGS',
'FormData' : 'POST',
'MIME_Type' : 'MIME',
}
def OpenURL(self, _object, _attributes={}, **_arguments):
"""OpenURL: Retrieves URL off the Web.
Required argument: Fully-qualified URL
Keyword argument to: Target file for saving downloaded data
Keyword argument toWindow: Target window for resource at URL (-1 for top window, 0 for new window)
Keyword argument Flags: Valid Flags settings are: 1-Ignore the document cache; 2-Ignore the image cache; 4-Operate in background mode.
Keyword argument FormData: data to post
Keyword argument MIME_Type: MIME type of data being posted
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'WWW!'
_subcode = 'OURL'
aetools.keysubst(_arguments, self._argmap_OpenURL)
_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_ParseAnchor = {
'withURL' : 'RELA',
}
def ParseAnchor(self, _object, _attributes={}, **_arguments):
"""ParseAnchor: Combines a base URL and a relative URL to produce a fully-qualified URL
Required argument: Base URL
Keyword argument withURL: Relative URL that is combined with the Base URL (in the direct object) to produce a fully-qualified URL.
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Fully-qualified URL
"""
_code = 'WWW!'
_subcode = 'PRSA'
aetools.keysubst(_arguments, self._argmap_ParseAnchor)
_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_ShowFile = {
'MIME_Type' : 'MIME',
'Window_Identifier' : 'WIND',
'URL' : 'URL ',
}
def ShowFile(self, _object, _attributes={}, **_arguments):
"""ShowFile: FileSpec containing data of specified MIME type to be rendered in window specified by Window Identifier.
Required argument: The file
Keyword argument MIME_Type: MIME type
Keyword argument Window_Identifier: Identifier of the target window for the URL. (Can use -1 for top window)
Keyword argument URL: URL that allows this document to be reloaded.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'WWW!'
_subcode = 'SHWF'
aetools.keysubst(_arguments, self._argmap_ShowFile)
_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 = {
}

View File

@@ -0,0 +1,84 @@
"""
Package generated from /Applications/Internet Explorer.app
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the Explorer module is removed.", stacklevel=2)
import aetools
Error = aetools.Error
import Standard_Suite
import URL_Suite
import Netscape_Suite
import Microsoft_Internet_Explorer
import Web_Browser_Suite
import Required_Suite
_code_to_module = {
'****' : Standard_Suite,
'GURL' : URL_Suite,
'MOSS' : Netscape_Suite,
'MSIE' : Microsoft_Internet_Explorer,
'WWW!' : Web_Browser_Suite,
'reqd' : Required_Suite,
}
_code_to_fullname = {
'****' : ('Explorer.Standard_Suite', 'Standard_Suite'),
'GURL' : ('Explorer.URL_Suite', 'URL_Suite'),
'MOSS' : ('Explorer.Netscape_Suite', 'Netscape_Suite'),
'MSIE' : ('Explorer.Microsoft_Internet_Explorer', 'Microsoft_Internet_Explorer'),
'WWW!' : ('Explorer.Web_Browser_Suite', 'Web_Browser_Suite'),
'reqd' : ('Explorer.Required_Suite', 'Required_Suite'),
}
from Standard_Suite import *
from URL_Suite import *
from Netscape_Suite import *
from Microsoft_Internet_Explorer import *
from Web_Browser_Suite import *
from Required_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(application)
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
}
class Explorer(Standard_Suite_Events,
URL_Suite_Events,
Netscape_Suite_Events,
Microsoft_Internet_Explorer_Events,
Web_Browser_Suite_Events,
Required_Suite_Events,
aetools.TalkTo):
_signature = 'MSIE'
_moduleName = 'Explorer'
_elemdict = application._elemdict
_propdict = application._propdict

View File

@@ -0,0 +1,279 @@
"""Suite Containers and folders: Classes that can contain other file system items
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'fndr'
class Containers_and_folders_Events:
pass
class disk(aetools.ComponentItem):
"""disk - A disk """
want = 'cdis'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - inherits some of its properties from the container class """
which = 'c@#^'
want = 'ctnr'
class _Prop_capacity(aetools.NProperty):
"""capacity - the total number of bytes (free or used) on the disk """
which = 'capa'
want = 'comp'
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 filesystem 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 = 'comp'
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_startup(aetools.NProperty):
"""startup - Is this disk the boot disk? """
which = 'istd'
want = 'bool'
# element 'alia' as ['indx', 'name']
# element 'appf' as ['indx', 'name', 'ID ']
# element 'cfol' as ['indx', 'name', 'ID ']
# element 'clpf' as ['indx', 'name']
# element 'cobj' as ['indx', 'name']
# element 'ctnr' as ['indx', 'name']
# element 'docf' as ['indx', 'name']
# element 'file' as ['indx', 'name']
# element 'inlf' as ['indx', 'name']
# element 'pack' as ['indx', 'name']
disks = disk
class desktop_2d_object(aetools.ComponentItem):
"""desktop-object - Desktop-object is the class of the \xd2desktop\xd3 object """
want = 'cdsk'
# element 'alia' as ['indx', 'name']
# element 'appf' as ['indx', 'name', 'ID ']
# element 'cdis' as ['indx', 'name']
# element 'cfol' as ['indx', 'name', 'ID ']
# element 'clpf' as ['indx', 'name']
# element 'cobj' as ['indx', 'name']
# element 'ctnr' as ['indx', 'name']
# element 'docf' as ['indx', 'name']
# element 'file' as ['indx', 'name']
# element 'inlf' as ['indx', 'name']
# element 'pack' as ['indx', 'name']
class folder(aetools.ComponentItem):
"""folder - A folder """
want = 'cfol'
# element 'alia' as ['indx', 'name']
# element 'appf' as ['indx', 'name', 'ID ']
# element 'cfol' as ['indx', 'name', 'ID ']
# element 'clpf' as ['indx', 'name']
# element 'cobj' as ['indx', 'name']
# element 'ctnr' as ['indx', 'name']
# element 'docf' as ['indx', 'name']
# element 'file' as ['indx', 'name']
# element 'inlf' as ['indx', 'name']
# element 'pack' as ['indx', 'name']
folders = folder
class container(aetools.ComponentItem):
"""container - An item that contains other items """
want = 'ctnr'
class _Prop_completely_expanded(aetools.NProperty):
"""completely expanded - (NOT AVAILABLE YET) Are the container and all of its children opened as outlines? (can only be set for containers viewed as lists) """
which = 'pexc'
want = 'bool'
class _Prop_container_window(aetools.NProperty):
"""container window - the container window for this folder """
which = 'cwnd'
want = 'obj '
class _Prop_entire_contents(aetools.NProperty):
"""entire contents - the entire contents of the container, including the contents of its children """
which = 'ects'
want = 'obj '
class _Prop_expandable(aetools.NProperty):
"""expandable - (NOT AVAILABLE YET) Is the container capable of being expanded as an outline? """
which = 'pexa'
want = 'bool'
class _Prop_expanded(aetools.NProperty):
"""expanded - (NOT AVAILABLE YET) Is the container opened as an outline? (can only be set for containers viewed as lists) """
which = 'pexp'
want = 'bool'
# element 'alia' as ['indx', 'name']
# element 'appf' as ['indx', 'name', 'ID ']
# element 'cfol' as ['indx', 'name', 'ID ']
# element 'clpf' as ['indx', 'name']
# element 'cobj' as ['indx', 'name']
# element 'ctnr' as ['indx', 'name']
# element 'docf' as ['indx', 'name']
# element 'file' as ['indx', 'name']
# element 'inlf' as ['indx', 'name']
# element 'pack' as ['indx', 'name']
containers = container
class trash_2d_object(aetools.ComponentItem):
"""trash-object - Trash-object is the class of the \xd2trash\xd3 object """
want = 'ctrs'
class _Prop_warns_before_emptying(aetools.NProperty):
"""warns before emptying - Display a dialog when emptying the trash? """
which = 'warn'
want = 'bool'
# element 'alia' as ['indx', 'name']
# element 'appf' as ['indx', 'name', 'ID ']
# element 'cfol' as ['indx', 'name', 'ID ']
# element 'clpf' as ['indx', 'name']
# element 'cobj' as ['indx', 'name']
# element 'ctnr' as ['indx', 'name']
# element 'docf' as ['indx', 'name']
# element 'file' as ['indx', 'name']
# element 'inlf' as ['indx', 'name']
# element 'pack' as ['indx', 'name']
disk._superclassnames = ['container']
import Files
import Finder_items
disk._privpropdict = {
'_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,
'startup' : _Prop_startup,
}
disk._privelemdict = {
'alias_file' : Files.alias_file,
'application_file' : Files.application_file,
'clipping' : Files.clipping,
'container' : container,
'document_file' : Files.document_file,
'file' : Files.file,
'folder' : folder,
'internet_location_file' : Files.internet_location_file,
'item' : Finder_items.item,
'package' : Files.package,
}
desktop_2d_object._superclassnames = ['container']
desktop_2d_object._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
}
desktop_2d_object._privelemdict = {
'alias_file' : Files.alias_file,
'application_file' : Files.application_file,
'clipping' : Files.clipping,
'container' : container,
'disk' : disk,
'document_file' : Files.document_file,
'file' : Files.file,
'folder' : folder,
'internet_location_file' : Files.internet_location_file,
'item' : Finder_items.item,
'package' : Files.package,
}
folder._superclassnames = ['container']
folder._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
}
folder._privelemdict = {
'alias_file' : Files.alias_file,
'application_file' : Files.application_file,
'clipping' : Files.clipping,
'container' : container,
'document_file' : Files.document_file,
'file' : Files.file,
'folder' : folder,
'internet_location_file' : Files.internet_location_file,
'item' : Finder_items.item,
'package' : Files.package,
}
container._superclassnames = ['item']
container._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'completely_expanded' : _Prop_completely_expanded,
'container_window' : _Prop_container_window,
'entire_contents' : _Prop_entire_contents,
'expandable' : _Prop_expandable,
'expanded' : _Prop_expanded,
}
container._privelemdict = {
'alias_file' : Files.alias_file,
'application_file' : Files.application_file,
'clipping' : Files.clipping,
'container' : container,
'document_file' : Files.document_file,
'file' : Files.file,
'folder' : folder,
'internet_location_file' : Files.internet_location_file,
'item' : Finder_items.item,
'package' : Files.package,
}
trash_2d_object._superclassnames = ['container']
trash_2d_object._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'warns_before_emptying' : _Prop_warns_before_emptying,
}
trash_2d_object._privelemdict = {
'alias_file' : Files.alias_file,
'application_file' : Files.application_file,
'clipping' : Files.clipping,
'container' : container,
'document_file' : Files.document_file,
'file' : Files.file,
'folder' : folder,
'internet_location_file' : Files.internet_location_file,
'item' : Finder_items.item,
'package' : Files.package,
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'cdis' : disk,
'cdsk' : desktop_2d_object,
'cfol' : folder,
'ctnr' : container,
'ctrs' : trash_2d_object,
}
_propdeclarations = {
'c@#^' : _Prop__3c_Inheritance_3e_,
'capa' : _Prop_capacity,
'cwnd' : _Prop_container_window,
'dfmt' : _Prop_format,
'ects' : _Prop_entire_contents,
'frsp' : _Prop_free_space,
'igpr' : _Prop_ignore_privileges,
'isej' : _Prop_ejectable,
'isrv' : _Prop_local_volume,
'istd' : _Prop_startup,
'pexa' : _Prop_expandable,
'pexc' : _Prop_completely_expanded,
'pexp' : _Prop_expanded,
'warn' : _Prop_warns_before_emptying,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,145 @@
"""Suite Enumerations: Enumerations for the Finder
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'tpnm'
from StdSuites.Type_Names_Suite import *
class Enumerations_Events(Type_Names_Suite_Events):
pass
_Enum_earr = {
'not_arranged' : 'narr', #
'snap_to_grid' : 'grda', #
'arranged_by_name' : 'nama', #
'arranged_by_modification_date' : 'mdta', #
'arranged_by_creation_date' : 'cdta', #
'arranged_by_size' : 'siza', #
'arranged_by_kind' : 'kina', #
'arranged_by_label' : 'laba', #
}
_Enum_ecvw = {
'icon_view' : 'icnv', #
'list_view' : 'lsvw', #
'column_view' : 'clvw', #
}
_Enum_edfm = {
'Mac_OS_format' : 'dfhf', #
'Mac_OS_Extended_format' : 'dfh+', #
'UFS_format' : 'dfuf', #
'NFS_format' : 'dfnf', #
'audio_format' : 'dfau', #
'ProDOS_format' : 'dfpr', #
'MS_2d_DOS_format' : 'dfms', #
'ISO_9660_format' : 'df96', #
'High_Sierra_format' : 'dfhs', #
'QuickTake_format' : 'dfqt', #
'Apple_Photo_format' : 'dfph', #
'AppleShare_format' : 'dfas', #
'UDF_format' : 'dfud', #
'WebDAV_format' : 'dfwd', #
'FTP_format' : 'dfft', #
'Packet_2d_written_UDF_format' : 'dfpu', #
'unknown_format' : 'df??', #
}
_Enum_elsv = {
'name_column' : 'elsn', #
'modification_date_column' : 'elsm', #
'creation_date_column' : 'elsc', #
'size_column' : 'elss', #
'kind_column' : 'elsk', #
'label_column' : 'elsl', #
'version_column' : 'elsv', #
'comment_column' : 'elsC', #
}
_Enum_ipnl = {
'General_Information_panel' : 'gpnl', #
'Sharing_panel' : 'spnl', #
'Memory_panel' : 'mpnl', #
'Preview_panel' : 'vpnl', #
'Application_panel' : 'apnl', #
'Languages_panel' : 'pklg', #
'Plugins_panel' : 'pkpg', #
'Name__26__Extension_panel' : 'npnl', #
'Comments_panel' : 'cpnl', #
'Content_Index_panel' : 'cinl', #
}
_Enum_isiz = {
'mini' : 'miic', #
'small' : 'smic', #
'large' : 'lgic', #
}
_Enum_lvic = {
'small_icon' : 'smic', #
'large_icon' : 'lgic', #
}
_Enum_priv = {
'read_only' : 'read', #
'read_write' : 'rdwr', #
'write_only' : 'writ', #
'none' : 'none', #
}
_Enum_sodr = {
'normal' : 'snrm', #
'reversed' : 'srvs', #
}
_Enum_vwby = {
'conflicts' : 'cflc', #
'existing_items' : 'exsi', #
'small_icon' : 'smic', #
'icon' : 'iimg', #
'name' : 'pnam', #
'modification_date' : 'asmo', #
'size' : 'ptsz', #
'kind' : 'kind', #
'comment' : 'comt', #
'label' : 'labi', #
'version' : 'vers', #
'creation_date' : 'ascd', #
'small_button' : 'smbu', #
'large_button' : 'lgbu', #
'grid' : 'grid', #
'all' : 'kyal', #
}
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
'earr' : _Enum_earr,
'ecvw' : _Enum_ecvw,
'edfm' : _Enum_edfm,
'elsv' : _Enum_elsv,
'ipnl' : _Enum_ipnl,
'isiz' : _Enum_isiz,
'lvic' : _Enum_lvic,
'priv' : _Enum_priv,
'sodr' : _Enum_sodr,
'vwby' : _Enum_vwby,
}

View File

@@ -0,0 +1,212 @@
"""Suite Files: Classes representing files
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'fndr'
class Files_Events:
pass
class alias_file(aetools.ComponentItem):
"""alias file - An alias file (created with \xd2Make Alias\xd3) """
want = 'alia'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - inherits some of its properties from the file class """
which = 'c@#^'
want = 'file'
class _Prop_original_item(aetools.NProperty):
"""original item - the original item pointed to by the alias """
which = 'orig'
want = 'obj '
alias_files = alias_file
class application_file(aetools.ComponentItem):
"""application file - An application's file on disk """
want = 'appf'
class _Prop_accepts_high_level_events(aetools.NProperty):
"""accepts high level events - Is the application high-level event aware? (OBSOLETE: always returns true) """
which = 'isab'
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_minimum_size(aetools.NProperty):
"""minimum size - the smallest memory size with which the application can be launched """
which = 'mprt'
want = 'long'
class _Prop_opens_in_Classic(aetools.NProperty):
"""opens in Classic - Should the application launch in the Classic environment? """
which = 'Clsc'
want = 'bool'
class _Prop_preferred_size(aetools.NProperty):
"""preferred size - the memory size with which the application will be launched """
which = 'appt'
want = 'long'
class _Prop_suggested_size(aetools.NProperty):
"""suggested size - the memory size with which the developer recommends the application be launched """
which = 'sprt'
want = 'long'
application_files = application_file
class clipping(aetools.ComponentItem):
"""clipping - A clipping """
want = 'clpf'
class _Prop_clipping_window(aetools.NProperty):
"""clipping window - (NOT AVAILABLE YET) the clipping window for this clipping """
which = 'lwnd'
want = 'obj '
clippings = clipping
class document_file(aetools.ComponentItem):
"""document file - A document file """
want = 'docf'
document_files = document_file
class file(aetools.ComponentItem):
"""file - A file """
want = 'file'
class _Prop_creator_type(aetools.NProperty):
"""creator type - the OSType identifying the application that created the item """
which = 'fcrt'
want = 'type'
class _Prop_file_type(aetools.NProperty):
"""file type - the OSType identifying the type of data contained in the item """
which = 'asty'
want = 'type'
class _Prop_product_version(aetools.NProperty):
"""product version - the version of the product (visible at the top of the \xd2Get Info\xd3 window) """
which = 'ver2'
want = 'utxt'
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 \xd2Get Info\xd3 window) """
which = 'vers'
want = 'utxt'
files = file
class internet_location_file(aetools.ComponentItem):
"""internet location file - A file containing an internet location """
want = 'inlf'
class _Prop_location(aetools.NProperty):
"""location - the internet location """
which = 'iloc'
want = 'utxt'
internet_location_files = internet_location_file
class package(aetools.ComponentItem):
"""package - A package """
want = 'pack'
packages = package
alias_file._superclassnames = ['file']
alias_file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'original_item' : _Prop_original_item,
}
alias_file._privelemdict = {
}
application_file._superclassnames = ['file']
application_file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'accepts_high_level_events' : _Prop_accepts_high_level_events,
'has_scripting_terminology' : _Prop_has_scripting_terminology,
'minimum_size' : _Prop_minimum_size,
'opens_in_Classic' : _Prop_opens_in_Classic,
'preferred_size' : _Prop_preferred_size,
'suggested_size' : _Prop_suggested_size,
}
application_file._privelemdict = {
}
clipping._superclassnames = ['file']
clipping._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'clipping_window' : _Prop_clipping_window,
}
clipping._privelemdict = {
}
document_file._superclassnames = ['file']
document_file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
}
document_file._privelemdict = {
}
import Finder_items
file._superclassnames = ['item']
file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'creator_type' : _Prop_creator_type,
'file_type' : _Prop_file_type,
'product_version' : _Prop_product_version,
'stationery' : _Prop_stationery,
'version' : _Prop_version,
}
file._privelemdict = {
}
internet_location_file._superclassnames = ['file']
internet_location_file._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'location' : _Prop_location,
}
internet_location_file._privelemdict = {
}
package._superclassnames = ['item']
package._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
}
package._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'alia' : alias_file,
'appf' : application_file,
'clpf' : clipping,
'docf' : document_file,
'file' : file,
'inlf' : internet_location_file,
'pack' : package,
}
_propdeclarations = {
'Clsc' : _Prop_opens_in_Classic,
'appt' : _Prop_preferred_size,
'asty' : _Prop_file_type,
'c@#^' : _Prop__3c_Inheritance_3e_,
'fcrt' : _Prop_creator_type,
'hscr' : _Prop_has_scripting_terminology,
'iloc' : _Prop_location,
'isab' : _Prop_accepts_high_level_events,
'lwnd' : _Prop_clipping_window,
'mprt' : _Prop_minimum_size,
'orig' : _Prop_original_item,
'pspd' : _Prop_stationery,
'sprt' : _Prop_suggested_size,
'ver2' : _Prop_product_version,
'vers' : _Prop_version,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,207 @@
"""Suite Finder Basics: Commonly-used Finder commands and object classes
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'fndr'
class Finder_Basics_Events:
def copy(self, _no_object=None, _attributes={}, **_arguments):
"""copy: (NOT AVAILABLE YET) Copy the selected items to the clipboard (the Finder must be the front application)
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'misc'
_subcode = 'copy'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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_sort = {
'by' : 'by ',
}
def sort(self, _object, _attributes={}, **_arguments):
"""sort: (NOT AVAILABLE YET) Return the specified object(s) in a sorted list
Required argument: a list of finder objects to sort
Keyword argument by: the property to sort the items by (name, index, date, etc.)
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the sorted items in their new order
"""
_code = 'DATA'
_subcode = 'SORT'
aetools.keysubst(_arguments, self._argmap_sort)
_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 Finder """
want = 'capp'
class _Prop_Finder_preferences(aetools.NProperty):
"""Finder preferences - (NOT AVAILABLE YET) Various preferences that apply to the Finder as a whole """
which = 'pfrp'
want = 'cprf'
Finder_preferences = _Prop_Finder_preferences()
class _Prop_clipboard(aetools.NProperty):
"""clipboard - (NOT AVAILABLE YET) the Finder\xd5s clipboard window """
which = 'pcli'
want = 'obj '
clipboard = _Prop_clipboard()
class _Prop_desktop(aetools.NProperty):
"""desktop - the desktop """
which = 'desk'
want = 'cdsk'
desktop = _Prop_desktop()
class _Prop_frontmost(aetools.NProperty):
"""frontmost - Is the Finder the frontmost process? """
which = 'pisf'
want = 'bool'
frontmost = _Prop_frontmost()
class _Prop_home(aetools.NProperty):
"""home - the home directory """
which = 'home'
want = 'cfol'
home = _Prop_home()
class _Prop_insertion_location(aetools.NProperty):
"""insertion location - the container in which a new folder would appear if \xd2New Folder\xd3 was selected """
which = 'pins'
want = 'obj '
insertion_location = _Prop_insertion_location()
class _Prop_name(aetools.NProperty):
"""name - the Finder\xd5s name """
which = 'pnam'
want = 'itxt'
name = _Prop_name()
class _Prop_product_version(aetools.NProperty):
"""product version - the version of the System software running on this computer """
which = 'ver2'
want = 'utxt'
product_version = _Prop_product_version()
class _Prop_selection(aetools.NProperty):
"""selection - the selection in the frontmost Finder window """
which = 'sele'
want = 'obj '
selection = _Prop_selection()
class _Prop_startup_disk(aetools.NProperty):
"""startup disk - the startup disk """
which = 'sdsk'
want = 'cdis'
startup_disk = _Prop_startup_disk()
class _Prop_trash(aetools.NProperty):
"""trash - the trash """
which = 'trsh'
want = 'ctrs'
trash = _Prop_trash()
class _Prop_version(aetools.NProperty):
"""version - the version of the Finder """
which = 'vers'
want = 'utxt'
version = _Prop_version()
class _Prop_visible(aetools.NProperty):
"""visible - Is the Finder\xd5s layer visible? """
which = 'pvis'
want = 'bool'
visible = _Prop_visible()
# element 'alia' as ['indx', 'name']
# element 'appf' as ['indx', 'name', 'ID ']
# element 'brow' as ['indx', 'ID ']
# element 'cdis' as ['indx', 'name', 'ID ']
# element 'cfol' as ['indx', 'name', 'ID ']
# element 'clpf' as ['indx', 'name']
# element 'cobj' as ['indx', 'rele', 'name', 'rang', 'test']
# element 'ctnr' as ['indx', 'name']
# element 'cwin' as ['indx', 'name']
# element 'docf' as ['indx', 'name']
# element 'file' as ['indx', 'name']
# element 'inlf' as ['indx', 'name']
# element 'lwnd' as ['indx', 'name']
# element 'pack' as ['indx', 'name']
application._superclassnames = []
import Files
import Window_classes
import Containers_and_folders
import Finder_items
application._privpropdict = {
'Finder_preferences' : _Prop_Finder_preferences,
'clipboard' : _Prop_clipboard,
'desktop' : _Prop_desktop,
'frontmost' : _Prop_frontmost,
'home' : _Prop_home,
'insertion_location' : _Prop_insertion_location,
'name' : _Prop_name,
'product_version' : _Prop_product_version,
'selection' : _Prop_selection,
'startup_disk' : _Prop_startup_disk,
'trash' : _Prop_trash,
'version' : _Prop_version,
'visible' : _Prop_visible,
}
application._privelemdict = {
'Finder_window' : Window_classes.Finder_window,
'alias_file' : Files.alias_file,
'application_file' : Files.application_file,
'clipping' : Files.clipping,
'clipping_window' : Window_classes.clipping_window,
'container' : Containers_and_folders.container,
'disk' : Containers_and_folders.disk,
'document_file' : Files.document_file,
'file' : Files.file,
'folder' : Containers_and_folders.folder,
'internet_location_file' : Files.internet_location_file,
'item' : Finder_items.item,
'package' : Files.package,
'window' : Window_classes.window,
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
}
_propdeclarations = {
'desk' : _Prop_desktop,
'home' : _Prop_home,
'pcli' : _Prop_clipboard,
'pfrp' : _Prop_Finder_preferences,
'pins' : _Prop_insertion_location,
'pisf' : _Prop_frontmost,
'pnam' : _Prop_name,
'pvis' : _Prop_visible,
'sdsk' : _Prop_startup_disk,
'sele' : _Prop_selection,
'trsh' : _Prop_trash,
'ver2' : _Prop_product_version,
'vers' : _Prop_version,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,355 @@
"""Suite Finder items: Commands used with file system items, and basic item definition
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'fndr'
class Finder_items_Events:
def add_to_favorites(self, _object, _attributes={}, **_arguments):
"""add to favorites: (NOT AVAILABLE YET) Add the items to the user\xd5s Favorites
Required argument: the items to add to the collection of Favorites
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'ffav'
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_clean_up = {
'by' : 'by ',
}
def clean_up(self, _object, _attributes={}, **_arguments):
"""clean up: (NOT AVAILABLE YET) Arrange items in window nicely (only applies to open windows in icon view that are not kept arranged)
Required argument: the window to clean up
Keyword argument by: the order in which to clean up the objects (name, index, date, etc.)
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'fclu'
aetools.keysubst(_arguments, self._argmap_clean_up)
_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 eject(self, _object=None, _attributes={}, **_arguments):
"""eject: Eject the specified disk(s)
Required argument: the disk(s) to eject
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'ejct'
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 empty(self, _object=None, _attributes={}, **_arguments):
"""empty: Empty the trash
Required argument: \xd2empty\xd3 and \xd2empty trash\xd3 both do the same thing
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'empt'
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 erase(self, _object, _attributes={}, **_arguments):
"""erase: (NOT AVAILABLE) Erase the specified disk(s)
Required argument: the items to erase
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'fera'
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 reveal(self, _object, _attributes={}, **_arguments):
"""reveal: Bring the specified object(s) into view
Required argument: the object to be made visible
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'misc'
_subcode = 'mvis'
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_update = {
'necessity' : 'nec?',
'registering_applications' : 'reg?',
}
def update(self, _object, _attributes={}, **_arguments):
"""update: Update the display of the specified object(s) to match their on-disk representation
Required argument: the item to update
Keyword argument necessity: only update if necessary (i.e. a finder window is open). default is false
Keyword argument registering_applications: register applications. default is true
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'fupd'
aetools.keysubst(_arguments, self._argmap_update)
_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 item(aetools.ComponentItem):
"""item - An item """
want = 'cobj'
class _Prop_bounds(aetools.NProperty):
"""bounds - the bounding rectangle of the item (can only be set for an item in a window viewed as icons or buttons) """
which = 'pbnd'
want = 'qdrt'
class _Prop_comment(aetools.NProperty):
"""comment - the comment of the item, displayed in the \xd2Get Info\xd3 window """
which = 'comt'
want = 'utxt'
class _Prop_container(aetools.NProperty):
"""container - the container of the item """
which = 'ctnr'
want = 'obj '
class _Prop_creation_date(aetools.NProperty):
"""creation date - the date on which the item was created """
which = 'ascd'
want = 'ldt '
class _Prop_description(aetools.NProperty):
"""description - a description of the item """
which = 'dscr'
want = 'utxt'
class _Prop_disk(aetools.NProperty):
"""disk - the disk on which the item is stored """
which = 'cdis'
want = 'obj '
class _Prop_displayed_name(aetools.NProperty):
"""displayed name - the user-visible name of the item """
which = 'dnam'
want = 'utxt'
class _Prop_everyones_privileges(aetools.NProperty):
"""everyones privileges - """
which = 'gstp'
want = 'priv'
class _Prop_extension_hidden(aetools.NProperty):
"""extension hidden - Is the item's extension hidden from the user? """
which = 'hidx'
want = 'bool'
class _Prop_group(aetools.NProperty):
"""group - the user or group that has special access to the container """
which = 'sgrp'
want = 'utxt'
class _Prop_group_privileges(aetools.NProperty):
"""group privileges - """
which = 'gppr'
want = 'priv'
class _Prop_icon(aetools.NProperty):
"""icon - the icon bitmap of the item """
which = 'iimg'
want = 'ifam'
class _Prop_index(aetools.NProperty):
"""index - the index in the front-to-back ordering within its container """
which = 'pidx'
want = 'long'
class _Prop_information_window(aetools.NProperty):
"""information window - the information window for the item """
which = 'iwnd'
want = 'obj '
class _Prop_kind(aetools.NProperty):
"""kind - the kind of the item """
which = 'kind'
want = 'utxt'
class _Prop_label_index(aetools.NProperty):
"""label index - the label of the item """
which = 'labi'
want = 'long'
class _Prop_locked(aetools.NProperty):
"""locked - Is the file locked? """
which = 'aslk'
want = 'bool'
class _Prop_modification_date(aetools.NProperty):
"""modification date - the date on which the item was last modified """
which = 'asmo'
want = 'ldt '
class _Prop_name(aetools.NProperty):
"""name - the name of the item """
which = 'pnam'
want = 'utxt'
class _Prop_name_extension(aetools.NProperty):
"""name extension - the name extension of the item (such as \xd2txt\xd3) """
which = 'nmxt'
want = 'utxt'
class _Prop_owner(aetools.NProperty):
"""owner - the user that owns the container """
which = 'sown'
want = 'utxt'
class _Prop_owner_privileges(aetools.NProperty):
"""owner privileges - """
which = 'ownr'
want = 'priv'
class _Prop_physical_size(aetools.NProperty):
"""physical size - the actual space used by the item on disk """
which = 'phys'
want = 'comp'
class _Prop_position(aetools.NProperty):
"""position - the position of the item within its parent window (can only be set for an item in a window viewed as icons or buttons) """
which = 'posn'
want = 'QDpt'
class _Prop_properties(aetools.NProperty):
"""properties - every property of an item """
which = 'pALL'
want = 'reco'
class _Prop_size(aetools.NProperty):
"""size - the logical size of the item """
which = 'ptsz'
want = 'comp'
class _Prop_url(aetools.NProperty):
"""url - the url of the item """
which = 'pURL'
want = 'utxt'
items = item
item._superclassnames = []
item._privpropdict = {
'bounds' : _Prop_bounds,
'comment' : _Prop_comment,
'container' : _Prop_container,
'creation_date' : _Prop_creation_date,
'description' : _Prop_description,
'disk' : _Prop_disk,
'displayed_name' : _Prop_displayed_name,
'everyones_privileges' : _Prop_everyones_privileges,
'extension_hidden' : _Prop_extension_hidden,
'group' : _Prop_group,
'group_privileges' : _Prop_group_privileges,
'icon' : _Prop_icon,
'index' : _Prop_index,
'information_window' : _Prop_information_window,
'kind' : _Prop_kind,
'label_index' : _Prop_label_index,
'locked' : _Prop_locked,
'modification_date' : _Prop_modification_date,
'name' : _Prop_name,
'name_extension' : _Prop_name_extension,
'owner' : _Prop_owner,
'owner_privileges' : _Prop_owner_privileges,
'physical_size' : _Prop_physical_size,
'position' : _Prop_position,
'properties' : _Prop_properties,
'size' : _Prop_size,
'url' : _Prop_url,
}
item._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'cobj' : item,
}
_propdeclarations = {
'ascd' : _Prop_creation_date,
'aslk' : _Prop_locked,
'asmo' : _Prop_modification_date,
'cdis' : _Prop_disk,
'comt' : _Prop_comment,
'ctnr' : _Prop_container,
'dnam' : _Prop_displayed_name,
'dscr' : _Prop_description,
'gppr' : _Prop_group_privileges,
'gstp' : _Prop_everyones_privileges,
'hidx' : _Prop_extension_hidden,
'iimg' : _Prop_icon,
'iwnd' : _Prop_information_window,
'kind' : _Prop_kind,
'labi' : _Prop_label_index,
'nmxt' : _Prop_name_extension,
'ownr' : _Prop_owner_privileges,
'pALL' : _Prop_properties,
'pURL' : _Prop_url,
'pbnd' : _Prop_bounds,
'phys' : _Prop_physical_size,
'pidx' : _Prop_index,
'pnam' : _Prop_name,
'posn' : _Prop_position,
'ptsz' : _Prop_size,
'sgrp' : _Prop_group,
'sown' : _Prop_owner,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,224 @@
"""Suite Legacy suite: Operations formerly handled by the Finder, but now automatically delegated to other applications
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'fleg'
class Legacy_suite_Events:
def restart(self, _no_object=None, _attributes={}, **_arguments):
"""restart: Restart the computer
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'rest'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def shut_down(self, _no_object=None, _attributes={}, **_arguments):
"""shut down: Shut Down the computer
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'shut'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def sleep(self, _no_object=None, _attributes={}, **_arguments):
"""sleep: Put the computer to sleep
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'fndr'
_subcode = 'slep'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
class application(aetools.ComponentItem):
"""application - The Finder """
want = 'capp'
class _Prop_desktop_picture(aetools.NProperty):
"""desktop picture - the desktop picture of the main monitor """
which = 'dpic'
want = 'file'
desktop_picture = _Prop_desktop_picture()
class application_process(aetools.ComponentItem):
"""application process - A process launched from an application file """
want = 'pcap'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - inherits some of its properties from the process class """
which = 'c@#^'
want = 'prcs'
class _Prop_application_file(aetools.NProperty):
"""application file - the application file from which this process was launched """
which = 'appf'
want = 'appf'
application_processes = application_process
class desk_accessory_process(aetools.ComponentItem):
"""desk accessory process - A process launched from a desk accessory file """
want = 'pcda'
class _Prop_desk_accessory_file(aetools.NProperty):
"""desk accessory file - the desk accessory file from which this process was launched """
which = 'dafi'
want = 'obj '
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_creator_type(aetools.NProperty):
"""creator type - the OSType of the creator of the process (the signature) """
which = 'fcrt'
want = 'type'
class _Prop_file(aetools.NProperty):
"""file - the file from which the process was launched """
which = 'file'
want = 'obj '
class _Prop_file_type(aetools.NProperty):
"""file type - the OSType of the file type of the process """
which = 'asty'
want = 'type'
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 = 'itxt'
class _Prop_partition_space_used(aetools.NProperty):
"""partition space used - the number of bytes currently used in the process' partition """
which = 'pusd'
want = 'long'
class _Prop_total_partition_size(aetools.NProperty):
"""total partition size - the size of the partition with which the process was launched """
which = 'appt'
want = 'long'
class _Prop_visible(aetools.NProperty):
"""visible - Is the process' layer visible? """
which = 'pvis'
want = 'bool'
processes = process
application._superclassnames = []
application._privpropdict = {
'desktop_picture' : _Prop_desktop_picture,
}
application._privelemdict = {
}
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 = []
process._privpropdict = {
'accepts_high_level_events' : _Prop_accepts_high_level_events,
'accepts_remote_events' : _Prop_accepts_remote_events,
'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,
'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_,
'dafi' : _Prop_desk_accessory_file,
'dpic' : _Prop_desktop_picture,
'fcrt' : _Prop_creator_type,
'file' : _Prop_file,
'hscr' : _Prop_has_scripting_terminology,
'isab' : _Prop_accepts_high_level_events,
'pisf' : _Prop_frontmost,
'pnam' : _Prop_name,
'pusd' : _Prop_partition_space_used,
'pvis' : _Prop_visible,
'revt' : _Prop_accepts_remote_events,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,335 @@
"""Suite Standard Suite: Common terms that most applications should support
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'CoRe'
from StdSuites.Standard_Suite import *
class Standard_Suite_Events(Standard_Suite_Events):
def close(self, _object, _attributes={}, **_arguments):
"""close: Close an object
Required argument: the object to close
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'core'
_subcode = 'clos'
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_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 whose elements are to be counted
Keyword argument each: the class of the elements to be counted
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the number of elements
"""
_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['----']
_argmap_data_size = {
'as' : 'rtyp',
}
def data_size(self, _object, _attributes={}, **_arguments):
"""data size: Return the size in bytes of an object
Required argument: the object whose data size is to be returned
Keyword argument as: the data type for which the size is calculated
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the size of the object in bytes
"""
_code = 'core'
_subcode = 'dsiz'
aetools.keysubst(_arguments, self._argmap_data_size)
_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: Move an item from its container to the trash
Required argument: the item to delete
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: to the item that was just deleted
"""
_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',
'replacing' : 'alrp',
'routing_suppressed' : 'rout',
}
def duplicate(self, _object, _attributes={}, **_arguments):
"""duplicate: Duplicate one or more object(s)
Required argument: the object(s) to duplicate
Keyword argument to: the new location for the object(s)
Keyword argument replacing: Specifies whether or not to replace items in the destination that have the same name as items being duplicated
Keyword argument routing_suppressed: Specifies whether or not to autoroute items (default is false). Only applies when copying to the system folder.
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: to the duplicated object(s)
"""
_code = 'core'
_subcode = 'clon'
aetools.keysubst(_arguments, self._argmap_duplicate)
_arguments['----'] = _object
aetools.enumsubst(_arguments, 'alrp', _Enum_bool)
aetools.enumsubst(_arguments, 'rout', _Enum_bool)
_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 in question
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: true if it exists, false if not
"""
_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['----']
_argmap_make = {
'new' : 'kocl',
'at' : 'insh',
'to' : 'to ',
'with_properties' : 'prdt',
}
def make(self, _no_object=None, _attributes={}, **_arguments):
"""make: Make a new element
Keyword argument new: the class of the new element
Keyword argument at: the location at which to insert the element
Keyword argument to: when creating an alias file, the original item to create an alias to or when creating a file viewer window, the target of the window
Keyword argument with_properties: the initial values for the properties of the element
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: to the new object(s)
"""
_code = 'core'
_subcode = 'crel'
aetools.keysubst(_arguments, self._argmap_make)
if _no_object is not 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',
'replacing' : 'alrp',
'positioned_at' : 'mvpl',
'routing_suppressed' : 'rout',
}
def move(self, _object, _attributes={}, **_arguments):
"""move: Move object(s) to a new location
Required argument: the object(s) to move
Keyword argument to: the new location for the object(s)
Keyword argument replacing: Specifies whether or not to replace items in the destination that have the same name as items being moved
Keyword argument positioned_at: Gives a list (in local window coordinates) of positions for the destination items
Keyword argument routing_suppressed: Specifies whether or not to autoroute items (default is false). Only applies when moving to the system folder.
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: to the object(s) after they have been moved
"""
_code = 'core'
_subcode = 'move'
aetools.keysubst(_arguments, self._argmap_move)
_arguments['----'] = _object
aetools.enumsubst(_arguments, 'alrp', _Enum_bool)
aetools.enumsubst(_arguments, 'mvpl', _Enum_list)
aetools.enumsubst(_arguments, 'rout', _Enum_bool)
_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_open = {
'using' : 'usin',
'with_properties' : 'prdt',
}
def open(self, _object, _attributes={}, **_arguments):
"""open: Open the specified object(s)
Required argument: list of objects to open
Keyword argument using: the application file to open the object with
Keyword argument with_properties: the initial values for the properties, to be included with the open command sent to the application that opens the direct object
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'odoc'
aetools.keysubst(_arguments, self._argmap_open)
_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_print_ = {
'with_properties' : 'prdt',
}
def print_(self, _object, _attributes={}, **_arguments):
"""print: Print the specified object(s)
Required argument: list of objects to print
Keyword argument with_properties: optional properties to be included with the print command sent to the application that prints the direct object
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'pdoc'
aetools.keysubst(_arguments, self._argmap_print_)
_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 quit(self, _no_object=None, _attributes={}, **_arguments):
"""quit: Quit the Finder
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'quit'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def select(self, _object, _attributes={}, **_arguments):
"""select: Select the specified object(s)
Required argument: the object to select
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'misc'
_subcode = 'slct'
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['----']
_Enum_list = None # XXXX enum list not found!!
_Enum_bool = None # XXXX enum bool not found!!
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,346 @@
"""Suite Type Definitions: Definitions of records used in scripting the Finder
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'tpdf'
class Type_Definitions_Events:
pass
class alias_list(aetools.ComponentItem):
"""alias list - A list of aliases. Use \xd4as alias list\xd5 when a list of aliases is needed (instead of a list of file system item references). """
want = 'alst'
class label(aetools.ComponentItem):
"""label - (NOT AVAILABLE YET) A Finder label (name and color) """
want = 'clbl'
class _Prop_color(aetools.NProperty):
"""color - the color associated with the label """
which = 'colr'
want = 'cRGB'
class _Prop_index(aetools.NProperty):
"""index - the index in the front-to-back ordering within its container """
which = 'pidx'
want = 'long'
class _Prop_name(aetools.NProperty):
"""name - the name associated with the label """
which = 'pnam'
want = 'utxt'
class preferences(aetools.ComponentItem):
"""preferences - (NOT AVAILABLE, SUBJECT TO CHANGE) The Finder Preferences """
want = 'cprf'
class _Prop_button_view_arrangement(aetools.NProperty):
"""button view arrangement - the method of arrangement of icons in default Finder button view windows """
which = 'barr'
want = 'earr'
class _Prop_button_view_icon_size(aetools.NProperty):
"""button view icon size - the size of icons displayed in Finder button view windows. """
which = 'bisz'
want = 'long'
class _Prop_calculates_folder_sizes(aetools.NProperty):
"""calculates folder sizes - Are folder sizes calculated and displayed in Finder list view windows? """
which = 'sfsz'
want = 'bool'
class _Prop_delay_before_springing(aetools.NProperty):
"""delay before springing - the delay before springing open a container in ticks (1/60th of a second) (12 is shortest delay, 60 is longest delay) """
which = 'dela'
want = 'shor'
class _Prop_list_view_icon_size(aetools.NProperty):
"""list view icon size - the size of icons displayed in Finder list view windows. """
which = 'lisz'
want = 'long'
class _Prop_shows_comments(aetools.NProperty):
"""shows comments - Are comments displayed in default Finder list view windows? """
which = 'scom'
want = 'bool'
class _Prop_shows_creation_date(aetools.NProperty):
"""shows creation date - Are creation dates displayed in default Finder list view windows? """
which = 'scda'
want = 'bool'
class _Prop_shows_kind(aetools.NProperty):
"""shows kind - Are document kinds displayed in default Finder list view windows? """
which = 'sknd'
want = 'bool'
class _Prop_shows_label(aetools.NProperty):
"""shows label - Are labels displayed in default Finder list view windows? """
which = 'slbl'
want = 'bool'
class _Prop_shows_modification_date(aetools.NProperty):
"""shows modification date - Are modification dates displayed in default Finder list view windows? """
which = 'sdat'
want = 'bool'
class _Prop_shows_size(aetools.NProperty):
"""shows size - Are file sizes displayed in default Finder list view windows? """
which = 'ssiz'
want = 'bool'
class _Prop_shows_version(aetools.NProperty):
"""shows version - Are file versions displayed in default Finder list view windows? """
which = 'svrs'
want = 'bool'
class _Prop_spatial_view_arrangement(aetools.NProperty):
"""spatial view arrangement - the method of arrangement of icons in default Finder spatial view windows """
which = 'iarr'
want = 'earr'
class _Prop_spatial_view_icon_size(aetools.NProperty):
"""spatial view icon size - the size of icons displayed in Finder spatial view windows. """
which = 'iisz'
want = 'long'
class _Prop_spring_open_folders(aetools.NProperty):
"""spring open folders - Spring open folders after the specified delay? """
which = 'sprg'
want = 'bool'
class _Prop_uses_relative_dates(aetools.NProperty):
"""uses relative dates - Are relative dates (e.g., today, yesterday) shown in Finder list view windows? """
which = 'urdt'
want = 'bool'
class _Prop_uses_simple_menus(aetools.NProperty):
"""uses simple menus - Use simplified Finder menus? """
which = 'usme'
want = 'bool'
class _Prop_uses_wide_grid(aetools.NProperty):
"""uses wide grid - Space icons on a wide grid? """
which = 'uswg'
want = 'bool'
class _Prop_view_font(aetools.NProperty):
"""view font - the id of the font used in Finder views. """
which = 'vfnt'
want = 'long'
class _Prop_view_font_size(aetools.NProperty):
"""view font size - the size of the font used in Finder views """
which = 'vfsz'
want = 'long'
class _Prop_window(aetools.NProperty):
"""window - the window that would open if Finder preferences was opened """
which = 'cwin'
want = 'pwnd'
# element 'clbl' as ['indx', 'name']
class icon_view_options(aetools.ComponentItem):
"""icon view options - the icon view options """
want = 'icop'
_Prop_arrangement = _Prop_spatial_view_arrangement
class _Prop_icon_size(aetools.NProperty):
"""icon size - the size of icons displayed in the icon view """
which = 'lvis'
want = 'shor'
class icon_family(aetools.ComponentItem):
"""icon family - (NOT AVAILABLE YET) A family of icons """
want = 'ifam'
class _Prop_large_32_bit_icon(aetools.NProperty):
"""large 32 bit icon - the large 32-bit color icon """
which = 'il32'
want = 'il32'
class _Prop_large_4_bit_icon(aetools.NProperty):
"""large 4 bit icon - the large 4-bit color icon """
which = 'icl4'
want = 'icl4'
class _Prop_large_8_bit_icon(aetools.NProperty):
"""large 8 bit icon - the large 8-bit color icon """
which = 'icl8'
want = 'icl8'
class _Prop_large_8_bit_mask(aetools.NProperty):
"""large 8 bit mask - the large 8-bit mask for large 32-bit icons """
which = 'l8mk'
want = 'l8mk'
class _Prop_large_monochrome_icon_and_mask(aetools.NProperty):
"""large monochrome icon and mask - the large black-and-white icon and the mask for large icons """
which = 'ICN#'
want = 'ICN#'
class _Prop_small_32_bit_icon(aetools.NProperty):
"""small 32 bit icon - the small 32-bit color icon """
which = 'is32'
want = 'is32'
class _Prop_small_4_bit_icon(aetools.NProperty):
"""small 4 bit icon - the small 4-bit color icon """
which = 'ics4'
want = 'ics4'
class _Prop_small_8_bit_icon(aetools.NProperty):
"""small 8 bit icon - the small 8-bit color icon """
which = 'ics8'
want = 'ics8'
_Prop_small_8_bit_mask = _Prop_small_8_bit_icon
class _Prop_small_monochrome_icon_and_mask(aetools.NProperty):
"""small monochrome icon and mask - the small black-and-white icon and the mask for small icons """
which = 'ics#'
want = 'ics#'
class column(aetools.ComponentItem):
"""column - a column of a list view """
want = 'lvcl'
class _Prop_sort_direction(aetools.NProperty):
"""sort direction - The direction in which the window is sorted """
which = 'sord'
want = 'sodr'
class _Prop_visible(aetools.NProperty):
"""visible - is this column visible """
which = 'pvis'
want = 'bool'
class _Prop_width(aetools.NProperty):
"""width - the width of this column """
which = 'clwd'
want = 'shor'
columns = column
class list_view_options(aetools.ComponentItem):
"""list view options - the list view options """
want = 'lvop'
class _Prop_sort_column(aetools.NProperty):
"""sort column - the column that the list view is sorted on """
which = 'srtc'
want = 'lvcl'
# element 'lvcl' as ['indx', 'rele', 'rang', 'test']
alias_list._superclassnames = []
alias_list._privpropdict = {
}
alias_list._privelemdict = {
}
label._superclassnames = []
label._privpropdict = {
'color' : _Prop_color,
'index' : _Prop_index,
'name' : _Prop_name,
}
label._privelemdict = {
}
preferences._superclassnames = []
preferences._privpropdict = {
'button_view_arrangement' : _Prop_button_view_arrangement,
'button_view_icon_size' : _Prop_button_view_icon_size,
'calculates_folder_sizes' : _Prop_calculates_folder_sizes,
'delay_before_springing' : _Prop_delay_before_springing,
'list_view_icon_size' : _Prop_list_view_icon_size,
'shows_comments' : _Prop_shows_comments,
'shows_creation_date' : _Prop_shows_creation_date,
'shows_kind' : _Prop_shows_kind,
'shows_label' : _Prop_shows_label,
'shows_modification_date' : _Prop_shows_modification_date,
'shows_size' : _Prop_shows_size,
'shows_version' : _Prop_shows_version,
'spatial_view_arrangement' : _Prop_spatial_view_arrangement,
'spatial_view_icon_size' : _Prop_spatial_view_icon_size,
'spring_open_folders' : _Prop_spring_open_folders,
'uses_relative_dates' : _Prop_uses_relative_dates,
'uses_simple_menus' : _Prop_uses_simple_menus,
'uses_wide_grid' : _Prop_uses_wide_grid,
'view_font' : _Prop_view_font,
'view_font_size' : _Prop_view_font_size,
'window' : _Prop_window,
}
preferences._privelemdict = {
'label' : label,
}
icon_view_options._superclassnames = []
icon_view_options._privpropdict = {
'arrangement' : _Prop_arrangement,
'icon_size' : _Prop_icon_size,
}
icon_view_options._privelemdict = {
}
icon_family._superclassnames = []
icon_family._privpropdict = {
'large_32_bit_icon' : _Prop_large_32_bit_icon,
'large_4_bit_icon' : _Prop_large_4_bit_icon,
'large_8_bit_icon' : _Prop_large_8_bit_icon,
'large_8_bit_mask' : _Prop_large_8_bit_mask,
'large_monochrome_icon_and_mask' : _Prop_large_monochrome_icon_and_mask,
'small_32_bit_icon' : _Prop_small_32_bit_icon,
'small_4_bit_icon' : _Prop_small_4_bit_icon,
'small_8_bit_icon' : _Prop_small_8_bit_icon,
'small_8_bit_mask' : _Prop_small_8_bit_mask,
'small_monochrome_icon_and_mask' : _Prop_small_monochrome_icon_and_mask,
}
icon_family._privelemdict = {
}
column._superclassnames = []
column._privpropdict = {
'index' : _Prop_index,
'name' : _Prop_name,
'sort_direction' : _Prop_sort_direction,
'visible' : _Prop_visible,
'width' : _Prop_width,
}
column._privelemdict = {
}
list_view_options._superclassnames = []
list_view_options._privpropdict = {
'calculates_folder_sizes' : _Prop_calculates_folder_sizes,
'icon_size' : _Prop_icon_size,
'sort_column' : _Prop_sort_column,
'uses_relative_dates' : _Prop_uses_relative_dates,
}
list_view_options._privelemdict = {
'column' : column,
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'alst' : alias_list,
'clbl' : label,
'cprf' : preferences,
'icop' : icon_view_options,
'ifam' : icon_family,
'lvcl' : column,
'lvop' : list_view_options,
}
_propdeclarations = {
'ICN#' : _Prop_large_monochrome_icon_and_mask,
'barr' : _Prop_button_view_arrangement,
'bisz' : _Prop_button_view_icon_size,
'clwd' : _Prop_width,
'colr' : _Prop_color,
'cwin' : _Prop_window,
'dela' : _Prop_delay_before_springing,
'iarr' : _Prop_spatial_view_arrangement,
'icl4' : _Prop_large_4_bit_icon,
'icl8' : _Prop_large_8_bit_icon,
'ics#' : _Prop_small_monochrome_icon_and_mask,
'ics4' : _Prop_small_4_bit_icon,
'ics8' : _Prop_small_8_bit_icon,
'iisz' : _Prop_spatial_view_icon_size,
'il32' : _Prop_large_32_bit_icon,
'is32' : _Prop_small_32_bit_icon,
'l8mk' : _Prop_large_8_bit_mask,
'lisz' : _Prop_list_view_icon_size,
'lvis' : _Prop_icon_size,
'pidx' : _Prop_index,
'pnam' : _Prop_name,
'pvis' : _Prop_visible,
'scda' : _Prop_shows_creation_date,
'scom' : _Prop_shows_comments,
'sdat' : _Prop_shows_modification_date,
'sfsz' : _Prop_calculates_folder_sizes,
'sknd' : _Prop_shows_kind,
'slbl' : _Prop_shows_label,
'sord' : _Prop_sort_direction,
'sprg' : _Prop_spring_open_folders,
'srtc' : _Prop_sort_column,
'ssiz' : _Prop_shows_size,
'svrs' : _Prop_shows_version,
'urdt' : _Prop_uses_relative_dates,
'usme' : _Prop_uses_simple_menus,
'uswg' : _Prop_uses_wide_grid,
'vfnt' : _Prop_view_font,
'vfsz' : _Prop_view_font_size,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,229 @@
"""Suite Window classes: Classes representing windows
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'fndr'
class Window_classes_Events:
pass
class Finder_window(aetools.ComponentItem):
"""Finder window - A file viewer window """
want = 'brow'
class _Prop__3c_Inheritance_3e_(aetools.NProperty):
"""<Inheritance> - inherits some of its properties from the window class """
which = 'c@#^'
want = 'cwin'
class _Prop_current_view(aetools.NProperty):
"""current view - the current view for the container window """
which = 'pvew'
want = 'ecvw'
class _Prop_icon_view_options(aetools.NProperty):
"""icon view options - the icon view options for the container window """
which = 'icop'
want = 'icop'
class _Prop_list_view_options(aetools.NProperty):
"""list view options - the list view options for the container window """
which = 'lvop'
want = 'lvop'
class _Prop_target(aetools.NProperty):
"""target - the container at which this file viewer is targeted """
which = 'fvtg'
want = 'obj '
Finder_windows = Finder_window
class window(aetools.ComponentItem):
"""window - A window """
want = 'cwin'
class _Prop_bounds(aetools.NProperty):
"""bounds - the boundary rectangle for the window """
which = 'pbnd'
want = 'qdrt'
class _Prop_closeable(aetools.NProperty):
"""closeable - Does the window have a close box? """
which = 'hclb'
want = 'bool'
class _Prop_collapsed(aetools.NProperty):
"""collapsed - Is the window collapsed """
which = 'wshd'
want = 'bool'
class _Prop_floating(aetools.NProperty):
"""floating - Does the window have a title bar? """
which = 'isfl'
want = 'bool'
class _Prop_id(aetools.NProperty):
"""id - the unique id for this window """
which = 'ID '
want = 'magn'
class _Prop_index(aetools.NProperty):
"""index - the number of the window in the front-to-back layer ordering """
which = 'pidx'
want = 'long'
class _Prop_modal(aetools.NProperty):
"""modal - Is the window modal? """
which = 'pmod'
want = 'bool'
class _Prop_name(aetools.NProperty):
"""name - the name of the window """
which = 'pnam'
want = 'utxt'
class _Prop_position(aetools.NProperty):
"""position - the upper left position of the window """
which = 'posn'
want = 'QDpt'
class _Prop_properties(aetools.NProperty):
"""properties - every property of a window """
which = 'pALL'
want = 'reco'
class _Prop_resizable(aetools.NProperty):
"""resizable - Is the window resizable? """
which = 'prsz'
want = 'bool'
class _Prop_titled(aetools.NProperty):
"""titled - Does the window have a title bar? """
which = 'ptit'
want = 'bool'
class _Prop_visible(aetools.NProperty):
"""visible - Is the window visible (always true for open Finder windows)? """
which = 'pvis'
want = 'bool'
class _Prop_zoomable(aetools.NProperty):
"""zoomable - Is the window zoomable? """
which = 'iszm'
want = 'bool'
class _Prop_zoomed(aetools.NProperty):
"""zoomed - Is the window zoomed? """
which = 'pzum'
want = 'bool'
class _Prop_zoomed_full_size(aetools.NProperty):
"""zoomed full size - Is the window zoomed to the full size of the screen? (can only be set, not read) """
which = 'zumf'
want = 'bool'
windows = window
class information_window(aetools.ComponentItem):
"""information window - An inspector window (opened by \xd2Show Info\xd3) """
want = 'iwnd'
class _Prop_current_panel(aetools.NProperty):
"""current panel - the current panel in the information window """
which = 'panl'
want = 'ipnl'
class _Prop_item(aetools.NProperty):
"""item - the item from which this window was opened """
which = 'cobj'
want = 'obj '
class clipping_window(aetools.ComponentItem):
"""clipping window - The window containing a clipping """
want = 'lwnd'
clipping_windows = clipping_window
class preferences_window(aetools.ComponentItem):
"""preferences window - (NOT AVAILABLE YET) The Finder Preferences window """
want = 'pwnd'
Finder_window._superclassnames = ['window']
Finder_window._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'current_view' : _Prop_current_view,
'icon_view_options' : _Prop_icon_view_options,
'list_view_options' : _Prop_list_view_options,
'target' : _Prop_target,
}
Finder_window._privelemdict = {
}
window._superclassnames = []
window._privpropdict = {
'bounds' : _Prop_bounds,
'closeable' : _Prop_closeable,
'collapsed' : _Prop_collapsed,
'floating' : _Prop_floating,
'id' : _Prop_id,
'index' : _Prop_index,
'modal' : _Prop_modal,
'name' : _Prop_name,
'position' : _Prop_position,
'properties' : _Prop_properties,
'resizable' : _Prop_resizable,
'titled' : _Prop_titled,
'visible' : _Prop_visible,
'zoomable' : _Prop_zoomable,
'zoomed' : _Prop_zoomed,
'zoomed_full_size' : _Prop_zoomed_full_size,
}
window._privelemdict = {
}
information_window._superclassnames = ['window']
information_window._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'current_panel' : _Prop_current_panel,
'item' : _Prop_item,
}
information_window._privelemdict = {
}
clipping_window._superclassnames = ['window']
clipping_window._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
}
clipping_window._privelemdict = {
}
preferences_window._superclassnames = ['window']
preferences_window._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'current_panel' : _Prop_current_panel,
}
preferences_window._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'brow' : Finder_window,
'cwin' : window,
'iwnd' : information_window,
'lwnd' : clipping_window,
'pwnd' : preferences_window,
}
_propdeclarations = {
'ID ' : _Prop_id,
'c@#^' : _Prop__3c_Inheritance_3e_,
'cobj' : _Prop_item,
'fvtg' : _Prop_target,
'hclb' : _Prop_closeable,
'icop' : _Prop_icon_view_options,
'isfl' : _Prop_floating,
'iszm' : _Prop_zoomable,
'lvop' : _Prop_list_view_options,
'pALL' : _Prop_properties,
'panl' : _Prop_current_panel,
'pbnd' : _Prop_bounds,
'pidx' : _Prop_index,
'pmod' : _Prop_modal,
'pnam' : _Prop_name,
'posn' : _Prop_position,
'prsz' : _Prop_resizable,
'ptit' : _Prop_titled,
'pvew' : _Prop_current_view,
'pvis' : _Prop_visible,
'pzum' : _Prop_zoomed,
'wshd' : _Prop_collapsed,
'zumf' : _Prop_zoomed_full_size,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,237 @@
"""
Package generated from /System/Library/CoreServices/Finder.app
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the Finder package is removed.", stacklevel=2)
import aetools
Error = aetools.Error
import Standard_Suite
import Legacy_suite
import Containers_and_folders
import Files
import Finder_Basics
import Finder_items
import Window_classes
import Type_Definitions
import Enumerations
_code_to_module = {
'CoRe' : Standard_Suite,
'fleg' : Legacy_suite,
'fndr' : Containers_and_folders,
'fndr' : Files,
'fndr' : Finder_Basics,
'fndr' : Finder_items,
'fndr' : Window_classes,
'tpdf' : Type_Definitions,
'tpnm' : Enumerations,
}
_code_to_fullname = {
'CoRe' : ('Finder.Standard_Suite', 'Standard_Suite'),
'fleg' : ('Finder.Legacy_suite', 'Legacy_suite'),
'fndr' : ('Finder.Containers_and_folders', 'Containers_and_folders'),
'fndr' : ('Finder.Files', 'Files'),
'fndr' : ('Finder.Finder_Basics', 'Finder_Basics'),
'fndr' : ('Finder.Finder_items', 'Finder_items'),
'fndr' : ('Finder.Window_classes', 'Window_classes'),
'tpdf' : ('Finder.Type_Definitions', 'Type_Definitions'),
'tpnm' : ('Finder.Enumerations', 'Enumerations'),
}
from Standard_Suite import *
from Legacy_suite import *
from Containers_and_folders import *
from Files import *
from Finder_Basics import *
from Finder_items import *
from Window_classes import *
from Type_Definitions import *
from Enumerations 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(StdSuites.Type_Names_Suite.small_integer)
getbaseclasses(StdSuites.Type_Names_Suite.system_dictionary)
getbaseclasses(StdSuites.Type_Names_Suite.color_table)
getbaseclasses(StdSuites.Type_Names_Suite.fixed_point)
getbaseclasses(StdSuites.Type_Names_Suite.string)
getbaseclasses(StdSuites.Type_Names_Suite.type_element_info)
getbaseclasses(StdSuites.Type_Names_Suite.machine_location)
getbaseclasses(StdSuites.Type_Names_Suite.PostScript_picture)
getbaseclasses(StdSuites.Type_Names_Suite.type_property_info)
getbaseclasses(StdSuites.Type_Names_Suite.menu_item)
getbaseclasses(StdSuites.Type_Names_Suite.scrap_styles)
getbaseclasses(StdSuites.Type_Names_Suite.fixed_rectangle)
getbaseclasses(StdSuites.Type_Names_Suite.null)
getbaseclasses(StdSuites.Type_Names_Suite.type_event_info)
getbaseclasses(StdSuites.Type_Names_Suite.rotation)
getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_rectangle)
getbaseclasses(StdSuites.Type_Names_Suite.long_point)
getbaseclasses(StdSuites.Type_Names_Suite.target_id)
getbaseclasses(StdSuites.Type_Names_Suite.type_suite_info)
getbaseclasses(StdSuites.Type_Names_Suite.type_parameter_info)
getbaseclasses(StdSuites.Type_Names_Suite.long_fixed_point)
getbaseclasses(StdSuites.Type_Names_Suite.bounding_rectangle)
getbaseclasses(StdSuites.Type_Names_Suite.TIFF_picture)
getbaseclasses(StdSuites.Type_Names_Suite.long_fixed)
getbaseclasses(StdSuites.Type_Names_Suite.version)
getbaseclasses(StdSuites.Type_Names_Suite.RGB16_color)
getbaseclasses(StdSuites.Type_Names_Suite.double_integer)
getbaseclasses(StdSuites.Type_Names_Suite.location_reference)
getbaseclasses(StdSuites.Type_Names_Suite.point)
getbaseclasses(StdSuites.Type_Names_Suite.application_dictionary)
getbaseclasses(StdSuites.Type_Names_Suite.unsigned_integer)
getbaseclasses(StdSuites.Type_Names_Suite.menu)
getbaseclasses(StdSuites.Type_Names_Suite.small_real)
getbaseclasses(StdSuites.Type_Names_Suite.fixed)
getbaseclasses(StdSuites.Type_Names_Suite.type_class_info)
getbaseclasses(StdSuites.Type_Names_Suite.RGB96_color)
getbaseclasses(StdSuites.Type_Names_Suite.dash_style)
getbaseclasses(StdSuites.Type_Names_Suite.pixel_map_record)
getbaseclasses(StdSuites.Type_Names_Suite.extended_real)
getbaseclasses(StdSuites.Type_Names_Suite.long_rectangle)
getbaseclasses(process)
getbaseclasses(application_process)
getbaseclasses(desk_accessory_process)
getbaseclasses(application)
getbaseclasses(trash_2d_object)
getbaseclasses(desktop_2d_object)
getbaseclasses(container)
getbaseclasses(folder)
getbaseclasses(disk)
getbaseclasses(application)
getbaseclasses(alias_file)
getbaseclasses(package)
getbaseclasses(file)
getbaseclasses(application_file)
getbaseclasses(internet_location_file)
getbaseclasses(document_file)
getbaseclasses(clipping)
getbaseclasses(preferences_window)
getbaseclasses(Finder_window)
getbaseclasses(window)
getbaseclasses(clipping_window)
getbaseclasses(information_window)
getbaseclasses(item)
getbaseclasses(icon_view_options)
getbaseclasses(preferences)
getbaseclasses(alias_list)
getbaseclasses(icon_family)
getbaseclasses(label)
getbaseclasses(column)
getbaseclasses(list_view_options)
#
# Indices of types declared in this module
#
_classdeclarations = {
'shor' : StdSuites.Type_Names_Suite.small_integer,
'aeut' : StdSuites.Type_Names_Suite.system_dictionary,
'clrt' : StdSuites.Type_Names_Suite.color_table,
'fpnt' : StdSuites.Type_Names_Suite.fixed_point,
'TEXT' : StdSuites.Type_Names_Suite.string,
'elin' : StdSuites.Type_Names_Suite.type_element_info,
'mLoc' : StdSuites.Type_Names_Suite.machine_location,
'EPS ' : StdSuites.Type_Names_Suite.PostScript_picture,
'pinf' : StdSuites.Type_Names_Suite.type_property_info,
'cmen' : StdSuites.Type_Names_Suite.menu_item,
'styl' : StdSuites.Type_Names_Suite.scrap_styles,
'frct' : StdSuites.Type_Names_Suite.fixed_rectangle,
'null' : StdSuites.Type_Names_Suite.null,
'evin' : StdSuites.Type_Names_Suite.type_event_info,
'trot' : StdSuites.Type_Names_Suite.rotation,
'lfrc' : StdSuites.Type_Names_Suite.long_fixed_rectangle,
'lpnt' : StdSuites.Type_Names_Suite.long_point,
'targ' : StdSuites.Type_Names_Suite.target_id,
'suin' : StdSuites.Type_Names_Suite.type_suite_info,
'pmin' : StdSuites.Type_Names_Suite.type_parameter_info,
'lfpt' : StdSuites.Type_Names_Suite.long_fixed_point,
'qdrt' : StdSuites.Type_Names_Suite.bounding_rectangle,
'TIFF' : StdSuites.Type_Names_Suite.TIFF_picture,
'lfxd' : StdSuites.Type_Names_Suite.long_fixed,
'vers' : StdSuites.Type_Names_Suite.version,
'tr16' : StdSuites.Type_Names_Suite.RGB16_color,
'comp' : StdSuites.Type_Names_Suite.double_integer,
'insl' : StdSuites.Type_Names_Suite.location_reference,
'QDpt' : StdSuites.Type_Names_Suite.point,
'aete' : StdSuites.Type_Names_Suite.application_dictionary,
'magn' : StdSuites.Type_Names_Suite.unsigned_integer,
'cmnu' : StdSuites.Type_Names_Suite.menu,
'sing' : StdSuites.Type_Names_Suite.small_real,
'fixd' : StdSuites.Type_Names_Suite.fixed,
'gcli' : StdSuites.Type_Names_Suite.type_class_info,
'tr96' : StdSuites.Type_Names_Suite.RGB96_color,
'tdas' : StdSuites.Type_Names_Suite.dash_style,
'tpmm' : StdSuites.Type_Names_Suite.pixel_map_record,
'exte' : StdSuites.Type_Names_Suite.extended_real,
'lrct' : StdSuites.Type_Names_Suite.long_rectangle,
'prcs' : process,
'pcap' : application_process,
'pcda' : desk_accessory_process,
'capp' : application,
'ctrs' : trash_2d_object,
'cdsk' : desktop_2d_object,
'ctnr' : container,
'cfol' : folder,
'cdis' : disk,
'capp' : application,
'alia' : alias_file,
'pack' : package,
'file' : file,
'appf' : application_file,
'inlf' : internet_location_file,
'docf' : document_file,
'clpf' : clipping,
'pwnd' : preferences_window,
'brow' : Finder_window,
'cwin' : window,
'lwnd' : clipping_window,
'iwnd' : information_window,
'cobj' : item,
'icop' : icon_view_options,
'cprf' : preferences,
'alst' : alias_list,
'ifam' : icon_family,
'clbl' : label,
'lvcl' : column,
'lvop' : list_view_options,
}
class Finder(Standard_Suite_Events,
Legacy_suite_Events,
Containers_and_folders_Events,
Files_Events,
Finder_Basics_Events,
Finder_items_Events,
Window_classes_Events,
Type_Definitions_Events,
Enumerations_Events,
aetools.TalkTo):
_signature = 'MACS'
_moduleName = 'Finder'
_elemdict = application._elemdict
_propdict = application._propdict

View File

@@ -0,0 +1,269 @@
"""Suite Mozilla suite: Experimental Mozilla suite
Level 1, version 1
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'MOSS'
class Mozilla_suite_Events:
def Get_Import_Data(self, _no_object=None, _attributes={}, **_arguments):
"""Get Import Data: Returns a structure containing information that is of use to an external module in importing data from an external mail application into Communicator.
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: vRefNum and dirID of profile folder (2+4 bytes), vRefNum and DirID of the local mail folder (2+4 bytes), window type of front window (0 if none, \xd4Brwz\xd5 browser, \xd4Addr\xd5 addressbook, \xd4Mesg\xd5 messenger, etc., 4 bytes)
"""
_code = 'MOSS'
_subcode = 'Impt'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def Get_Profile_Name(self, _no_object=None, _attributes={}, **_arguments):
"""Get Profile Name: Get the current User Profile
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Name of the current profile, like \xd2Joe Bloggs\xd3. This is the name of the profile folder in the Netscape Users folder.
"""
_code = 'MOSS'
_subcode = 'upro'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def Get_workingURL(self, _no_object=None, _attributes={}, **_arguments):
"""Get workingURL: Get the path to the running application in URL format. This will allow a script to construct a relative URL
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Will return text of the from \xd2FILE://foo/applicationname\xd3
"""
_code = 'MOSS'
_subcode = 'wurl'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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_Go = {
'direction' : 'dire',
}
def Go(self, _object, _attributes={}, **_arguments):
"""Go: navigate a window: back, forward, again(reload), home)
Required argument: window
Keyword argument direction: undocumented, typecode 'dire'
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'MOSS'
_subcode = 'gogo'
aetools.keysubst(_arguments, self._argmap_Go)
_arguments['----'] = _object
aetools.enumsubst(_arguments, 'dire', _Enum_dire)
_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 Handle_command(self, _object, _attributes={}, **_arguments):
"""Handle command: Handle a command
Required argument: The command to handle
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'MOSS'
_subcode = 'hcmd'
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 Open_Address_Book(self, _no_object=None, _attributes={}, **_arguments):
"""Open Address Book: Opens the address book
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'MOSS'
_subcode = 'addr'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def Open_Component(self, _object, _attributes={}, **_arguments):
"""Open Component: Open a Communicator component
Required argument: The component to open
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'MOSS'
_subcode = 'cpnt'
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 Open_Profile_Manager(self, _no_object=None, _attributes={}, **_arguments):
"""Open Profile Manager: Open the user profile manager (obsolete)
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'MOSS'
_subcode = 'prfl'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def Open_bookmark(self, _object=None, _attributes={}, **_arguments):
"""Open bookmark: Reads in a bookmark file
Required argument: If not available, reloads the current bookmark file
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'MOSS'
_subcode = 'book'
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_Read_help_file = {
'with_index' : 'idid',
'search_text' : 'sear',
}
def Read_help_file(self, _object, _attributes={}, **_arguments):
"""Read help file: Reads in the help file (file should be in the help file format)
Required argument: undocumented, typecode 'alis'
Keyword argument with_index: Index to the help file. Defaults to \xd4DEFAULT\xd5)
Keyword argument search_text: Optional text to search for
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'MOSS'
_subcode = 'help'
aetools.keysubst(_arguments, self._argmap_Read_help_file)
_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['----']
_Enum_comp = {
'Navigator' : 'navg', # The Navigator component
'InBox' : 'inbx', # The InBox component
'Newsgroups' : 'colb', # The Newsgroups component
'Composer' : 'cpsr', # The Page Composer component
'Conference' : 'conf', # The Conference Component
'Calendar' : 'cald', # The Calendar Component
}
_Enum_dire = {
'again' : 'agai', # Again (reload)
'home' : 'home', # Home
'backward' : 'prev', # Previous page
'forward' : 'next', # Next page
}
_Enum_ncmd = {
'Get_new_mail' : '\x00\x00\x04W', #
'Send_queued_messages' : '\x00\x00\x04X', #
'Read_newsgroups' : '\x00\x00\x04\x04', #
'Show_Inbox' : '\x00\x00\x04\x05', #
'Show_Bookmarks_window' : '\x00\x00\x04\x06', #
'Show_History_window' : '\x00\x00\x04\x07', #
'Show_Address_Book_window' : '\x00\x00\x04\t', #
}
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
'comp' : _Enum_comp,
'dire' : _Enum_dire,
'ncmd' : _Enum_ncmd,
}

View File

@@ -0,0 +1,86 @@
"""Suite PowerPlant:
Level 0, version 0
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'ppnt'
class PowerPlant_Events:
_argmap_SwitchTellTarget = {
'to' : 'data',
}
def SwitchTellTarget(self, _no_object=None, _attributes={}, **_arguments):
"""SwitchTellTarget: Makes an object the \xd2focus\xd3 of AppleEvents
Keyword argument to: reference to new focus of AppleEvents
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'ppnt'
_subcode = 'sttg'
aetools.keysubst(_arguments, self._argmap_SwitchTellTarget)
if _no_object is not 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_select = {
'data' : 'data',
}
def select(self, _object, _attributes={}, **_arguments):
"""select: Sets the present selection
Required argument: object to select or container of sub-objects to select
Keyword argument data: sub-object(s) to select
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'misc'
_subcode = 'slct'
aetools.keysubst(_arguments, self._argmap_select)
_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['----']
_Enum_dbac = {
'DoNothing' : '\x00\x00\x00\x00', # No debugging action is taken.
'PostAlert' : '\x00\x00\x00\x01', # Post an alert.
'LowLevelDebugger' : '\x00\x00\x00\x02', # Break into the low level debugger (MacsBug).
'SourceDebugger' : '\x00\x00\x00\x03', # Break into the source level debugger (if source debugger is executing).
}
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
'dbac' : _Enum_dbac,
}

View File

@@ -0,0 +1,108 @@
"""Suite Required suite:
Level 0, version 0
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'reqd'
from StdSuites.Required_Suite import *
class Required_suite_Events(Required_Suite_Events):
def open(self, _object, _attributes={}, **_arguments):
"""open: Open the specified object(s)
Required argument: list of objects to open
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, _attributes={}, **_arguments):
"""print: Print the specified object(s)
Required argument: list of objects to print
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['----']
def quit(self, _no_object=None, _attributes={}, **_arguments):
"""quit: Quit Navigator
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'quit'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def run(self, _no_object=None, _attributes={}, **_arguments):
"""run: Sent to an application when it is double-clicked
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'oapp'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,243 @@
"""Suite Standard Suite: Common terms for most applications
Level 1, version 1
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'CoRe'
from StdSuites.Standard_Suite import *
class Standard_Suite_Events(Standard_Suite_Events):
def close(self, _object, _attributes={}, **_arguments):
"""close: Close an object
Required argument: the objects to close
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'core'
_subcode = 'clos'
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 data_size(self, _object, _attributes={}, **_arguments):
"""data size: Return the size in bytes of an object
Required argument: the object whose data size is to be returned
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the size of the object in bytes
"""
_code = 'core'
_subcode = 'dsiz'
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 whose data is to be returned
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: The data from the object
"""
_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_set = {
'to' : 'data',
}
def set(self, _object, _attributes={}, **_arguments):
"""set: Set an object\xd5s data
Required argument: the object to change
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 program """
want = 'capp'
class _Prop_alert_application(aetools.NProperty):
"""alert application - Most of the alerts will be sent to this application using yet unspecified AE interface. We need a few alert boxes: alert, confirm and notify. Any ideas on how to design this event? mailto:atotic@netscape.com. I\xd5d like to conform to the standard. """
which = 'ALAP'
want = 'type'
alert_application = _Prop_alert_application()
class _Prop_kiosk_mode(aetools.NProperty):
"""kiosk mode - Kiosk mode leaves very few menus enabled """
which = 'KOSK'
want = 'long'
kiosk_mode = _Prop_kiosk_mode()
# element 'cwin' as ['indx', 'name', 'ID ']
class window(aetools.ComponentItem):
"""window - A Window """
want = 'cwin'
class _Prop_URL(aetools.NProperty):
"""URL - Current URL """
which = 'curl'
want = 'TEXT'
class _Prop_bounds(aetools.NProperty):
"""bounds - the boundary rectangle for the window """
which = 'pbnd'
want = 'qdrt'
class _Prop_busy(aetools.NProperty):
"""busy - Is window loading something right now. 2, window is busy and will reject load requests. 1, window is busy, but will interrupt outstanding loads """
which = 'busy'
want = 'long'
class _Prop_closeable(aetools.NProperty):
"""closeable - Does the window have a close box? """
which = 'hclb'
want = 'bool'
class _Prop_floating(aetools.NProperty):
"""floating - Does the window float? """
which = 'isfl'
want = 'bool'
class _Prop_index(aetools.NProperty):
"""index - the number of the window """
which = 'pidx'
want = 'long'
class _Prop_modal(aetools.NProperty):
"""modal - Is the window modal? """
which = 'pmod'
want = 'bool'
class _Prop_name(aetools.NProperty):
"""name - the title of the window """
which = 'pnam'
want = 'itxt'
class _Prop_position(aetools.NProperty):
"""position - upper left coordinates of window """
which = 'ppos'
want = 'QDpt'
class _Prop_resizable(aetools.NProperty):
"""resizable - Is the window resizable? """
which = 'prsz'
want = 'bool'
class _Prop_titled(aetools.NProperty):
"""titled - Does the window have a title bar? """
which = 'ptit'
want = 'bool'
class _Prop_unique_ID(aetools.NProperty):
"""unique ID - Window\xd5s unique ID (a bridge between WWW! suite window id\xd5s and standard AE windows) """
which = 'wiid'
want = 'long'
class _Prop_visible(aetools.NProperty):
"""visible - is the window visible? """
which = 'pvis'
want = 'bool'
class _Prop_zoomable(aetools.NProperty):
"""zoomable - Is the window zoomable? """
which = 'iszm'
want = 'bool'
class _Prop_zoomed(aetools.NProperty):
"""zoomed - Is the window zoomed? """
which = 'pzum'
want = 'bool'
application._superclassnames = []
application._privpropdict = {
'alert_application' : _Prop_alert_application,
'kiosk_mode' : _Prop_kiosk_mode,
}
application._privelemdict = {
'window' : window,
}
window._superclassnames = []
window._privpropdict = {
'URL' : _Prop_URL,
'bounds' : _Prop_bounds,
'busy' : _Prop_busy,
'closeable' : _Prop_closeable,
'floating' : _Prop_floating,
'index' : _Prop_index,
'modal' : _Prop_modal,
'name' : _Prop_name,
'position' : _Prop_position,
'resizable' : _Prop_resizable,
'titled' : _Prop_titled,
'unique_ID' : _Prop_unique_ID,
'visible' : _Prop_visible,
'zoomable' : _Prop_zoomable,
'zoomed' : _Prop_zoomed,
}
window._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
'cwin' : window,
}
_propdeclarations = {
'ALAP' : _Prop_alert_application,
'KOSK' : _Prop_kiosk_mode,
'busy' : _Prop_busy,
'curl' : _Prop_URL,
'hclb' : _Prop_closeable,
'isfl' : _Prop_floating,
'iszm' : _Prop_zoomable,
'pbnd' : _Prop_bounds,
'pidx' : _Prop_index,
'pmod' : _Prop_modal,
'pnam' : _Prop_name,
'ppos' : _Prop_position,
'prsz' : _Prop_resizable,
'ptit' : _Prop_titled,
'pvis' : _Prop_visible,
'pzum' : _Prop_zoomed,
'wiid' : _Prop_unique_ID,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,60 @@
"""Suite Standard URL suite: Mac URL standard, supported by many apps
Level 1, version 1
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'GURL'
class Standard_URL_suite_Events:
_argmap_GetURL = {
'to' : 'dest',
'inside' : 'HWIN',
'from_' : 'refe',
}
def GetURL(self, _object, _attributes={}, **_arguments):
"""GetURL: Loads the URL (optionally to disk)
Required argument: The url
Keyword argument to: file the URL should be loaded into
Keyword argument inside: Window the URL should be loaded to
Keyword argument from_: Referrer, to be sent with the HTTP request
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'GURL'
_subcode = 'GURL'
aetools.keysubst(_arguments, self._argmap_GetURL)
_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 = {
}

View File

@@ -0,0 +1,122 @@
"""Suite Text:
Level 0, version 0
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'TEXT'
from StdSuites.Text_Suite import *
class Text_Events(Text_Suite_Events):
pass
class text(aetools.ComponentItem):
"""text - independent text view objects """
want = 'ctxt'
class _Prop_beginning(aetools.NProperty):
"""beginning - Beginning of element """
which = 'bgng'
want = 'obj '
class _Prop_end(aetools.NProperty):
"""end - Ending of element """
which = 'end '
want = 'obj '
class _Prop_infront(aetools.NProperty):
"""infront - Immediately before element """
which = 'pBef'
want = 'obj '
class _Prop_justbehind(aetools.NProperty):
"""justbehind - Immediately after element """
which = 'pAft'
want = 'obj '
class _Prop_updateLevel(aetools.NProperty):
"""updateLevel - updating level. Can only be incremented or decremented. Do so only in a try block -- if the level is greater than zero, visual text updating will cease. """
which = 'pUpL'
want = 'long'
# element 'stys' as ['indx', 'name']
class styleset(aetools.ComponentItem):
"""styleset - A style \xd2set\xd3 that may be used repeatedly in text objects. """
want = 'stys'
class _Prop_color(aetools.NProperty):
"""color - the color """
which = 'colr'
want = 'RGB '
class _Prop_font(aetools.NProperty):
"""font - font name """
which = 'font'
want = 'TEXT'
class _Prop_name(aetools.NProperty):
"""name - style name """
which = 'pnam'
want = 'TEXT'
class _Prop_size(aetools.NProperty):
"""size - the size in points """
which = 'ptsz'
want = 'long'
class _Prop_style(aetools.NProperty):
"""style - the text styles or face attributes """
which = 'txst'
want = 'tsty'
class _Prop_writing_code(aetools.NProperty):
"""writing code - the script system and language """
which = 'psct'
want = 'tsty'
stylesets = styleset
text._superclassnames = []
text._privpropdict = {
'beginning' : _Prop_beginning,
'end' : _Prop_end,
'infront' : _Prop_infront,
'justbehind' : _Prop_justbehind,
'updateLevel' : _Prop_updateLevel,
}
text._privelemdict = {
'styleset' : styleset,
}
styleset._superclassnames = []
styleset._privpropdict = {
'color' : _Prop_color,
'font' : _Prop_font,
'name' : _Prop_name,
'size' : _Prop_size,
'style' : _Prop_style,
'writing_code' : _Prop_writing_code,
}
styleset._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'ctxt' : text,
'stys' : styleset,
}
_propdeclarations = {
'bgng' : _Prop_beginning,
'colr' : _Prop_color,
'end ' : _Prop_end,
'font' : _Prop_font,
'pAft' : _Prop_justbehind,
'pBef' : _Prop_infront,
'pUpL' : _Prop_updateLevel,
'pnam' : _Prop_name,
'psct' : _Prop_writing_code,
'ptsz' : _Prop_size,
'txst' : _Prop_style,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,426 @@
"""Suite WorldWideWeb suite, as defined in Spyglass spec.:
Level 1, version 1
Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'WWW!'
class WorldWideWeb_suite_Events:
_argmap_OpenURL = {
'to' : 'INTO',
'toWindow' : 'WIND',
'flags' : 'FLGS',
'post_data' : 'POST',
'post_type' : 'MIME',
'progressApp' : 'PROG',
}
def OpenURL(self, _object, _attributes={}, **_arguments):
"""OpenURL: Opens a URL. Allows for more options than GetURL event
Required argument: URL
Keyword argument to: file destination
Keyword argument toWindow: window iD
Keyword argument flags: Binary: any combination of 1, 2 and 4 is allowed: 1 and 2 mean force reload the document. 4 is ignored
Keyword argument post_data: Form posting data
Keyword argument post_type: MIME type of the posting data. Defaults to application/x-www-form-urlencoded
Keyword argument progressApp: Application that will display progress
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: ID of the loading window
"""
_code = 'WWW!'
_subcode = 'OURL'
aetools.keysubst(_arguments, self._argmap_OpenURL)
_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_ShowFile = {
'MIME_type' : 'MIME',
'Window_ID' : 'WIND',
'URL' : 'URL ',
}
def ShowFile(self, _object, _attributes={}, **_arguments):
"""ShowFile: Similar to OpenDocuments, except that it specifies the parent URL, and MIME type of the file
Required argument: File to open
Keyword argument MIME_type: MIME type
Keyword argument Window_ID: Window to open the file in
Keyword argument URL: Use this as a base URL
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Window ID of the loaded window. 0 means ShowFile failed, FFFFFFF means that data was not appropriate type to display in the browser.
"""
_code = 'WWW!'
_subcode = 'SHWF'
aetools.keysubst(_arguments, self._argmap_ShowFile)
_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_cancel_progress = {
'in_window' : 'WIND',
}
def cancel_progress(self, _object=None, _attributes={}, **_arguments):
"""cancel progress: Interrupts the download of the document in the given window
Required argument: progress ID, obtained from the progress app
Keyword argument in_window: window ID of the progress to cancel
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'WWW!'
_subcode = 'CNCL'
aetools.keysubst(_arguments, self._argmap_cancel_progress)
_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 find_URL(self, _object, _attributes={}, **_arguments):
"""find URL: If the file was downloaded by Netscape, you can call FindURL to find out the URL used to download the file.
Required argument: File spec
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: The URL
"""
_code = 'WWW!'
_subcode = 'FURL'
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_window_info(self, _object=None, _attributes={}, **_arguments):
"""get window info: Returns the information about the window as a list. Currently the list contains the window title and the URL. You can get the same information using standard Apple Event GetProperty.
Required argument: window ID
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: undocumented, typecode 'list'
"""
_code = 'WWW!'
_subcode = 'WNFO'
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 list_windows(self, _no_object=None, _attributes={}, **_arguments):
"""list windows: Lists the IDs of all the hypertext windows
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: List of unique IDs of all the hypertext windows
"""
_code = 'WWW!'
_subcode = 'LSTW'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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_parse_anchor = {
'relative_to' : 'RELA',
}
def parse_anchor(self, _object, _attributes={}, **_arguments):
"""parse anchor: Resolves the relative URL
Required argument: Main URL
Keyword argument relative_to: Relative URL
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: Parsed URL
"""
_code = 'WWW!'
_subcode = 'PRSA'
aetools.keysubst(_arguments, self._argmap_parse_anchor)
_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 register_URL_echo(self, _object=None, _attributes={}, **_arguments):
"""register URL echo: Registers the \xd2echo\xd3 application. Each download from now on will be echoed to this application.
Required argument: Application signature
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'WWW!'
_subcode = 'RGUE'
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_register_protocol = {
'for_protocol' : 'PROT',
}
def register_protocol(self, _object=None, _attributes={}, **_arguments):
"""register protocol: Registers application as a \xd2handler\xd3 for this protocol with a given prefix. The handler will receive \xd2OpenURL\xd3, or if that fails, \xd2GetURL\xd3 event.
Required argument: Application sig
Keyword argument for_protocol: protocol prefix: \xd2finger:\xd3, \xd2file\xd3,
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: TRUE if registration has been successful
"""
_code = 'WWW!'
_subcode = 'RGPR'
aetools.keysubst(_arguments, self._argmap_register_protocol)
_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_register_viewer = {
'MIME_type' : 'MIME',
'with_file_type' : 'FTYP',
}
def register_viewer(self, _object, _attributes={}, **_arguments):
"""register viewer: Registers an application as a \xd4special\xd5 viewer for this MIME type. The application will be launched with ViewDoc events
Required argument: Application sig
Keyword argument MIME_type: MIME type viewer is registering for
Keyword argument with_file_type: Mac file type for the downloaded files
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: TRUE if registration has been successful
"""
_code = 'WWW!'
_subcode = 'RGVW'
aetools.keysubst(_arguments, self._argmap_register_viewer)
_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_register_window_close = {
'for_window' : 'WIND',
}
def register_window_close(self, _object=None, _attributes={}, **_arguments):
"""register window close: Netscape will notify registered application when this window closes
Required argument: Application signature
Keyword argument for_window: window ID
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: true if successful
"""
_code = 'WWW!'
_subcode = 'RGWC'
aetools.keysubst(_arguments, self._argmap_register_window_close)
_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 unregister_URL_echo(self, _object, _attributes={}, **_arguments):
"""unregister URL echo: cancels URL echo
Required argument: application signature
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'WWW!'
_subcode = 'UNRU'
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_unregister_protocol = {
'for_protocol' : 'PROT',
}
def unregister_protocol(self, _object=None, _attributes={}, **_arguments):
"""unregister protocol: reverses the effects of \xd2register protocol\xd3
Required argument: Application sig.
Keyword argument for_protocol: protocol prefix. If none, unregister for all protocols
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: TRUE if successful
"""
_code = 'WWW!'
_subcode = 'UNRP'
aetools.keysubst(_arguments, self._argmap_unregister_protocol)
_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_unregister_viewer = {
'MIME_type' : 'MIME',
}
def unregister_viewer(self, _object, _attributes={}, **_arguments):
"""unregister viewer: Revert to the old way of handling this MIME type
Required argument: Application sig
Keyword argument MIME_type: MIME type to be unregistered
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: TRUE if the event was successful
"""
_code = 'WWW!'
_subcode = 'UNRV'
aetools.keysubst(_arguments, self._argmap_unregister_viewer)
_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_unregister_window_close = {
'for_window' : 'WIND',
}
def unregister_window_close(self, _object=None, _attributes={}, **_arguments):
"""unregister window close: Undo for register window close
Required argument: Application signature
Keyword argument for_window: window ID
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: true if successful
"""
_code = 'WWW!'
_subcode = 'UNRC'
aetools.keysubst(_arguments, self._argmap_unregister_window_close)
_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 webActivate(self, _object=None, _attributes={}, **_arguments):
"""webActivate: Makes Netscape the frontmost application, and selects a given window. This event is here for suite completeness/ cross-platform compatibility only, you should use standard AppleEvents instead.
Required argument: window to bring to front
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'WWW!'
_subcode = 'ACTV'
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 = {
}

View File

@@ -0,0 +1,109 @@
"""
Package generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the Netscape package is removed.", stacklevel=2)
import aetools
Error = aetools.Error
import Standard_Suite
import Standard_URL_suite
import Mozilla_suite
import Text
import WorldWideWeb_suite
import PowerPlant
import Required_suite
_code_to_module = {
'CoRe' : Standard_Suite,
'GURL' : Standard_URL_suite,
'MOSS' : Mozilla_suite,
'TEXT' : Text,
'WWW!' : WorldWideWeb_suite,
'ppnt' : PowerPlant,
'reqd' : Required_suite,
}
_code_to_fullname = {
'CoRe' : ('Netscape.Standard_Suite', 'Standard_Suite'),
'GURL' : ('Netscape.Standard_URL_suite', 'Standard_URL_suite'),
'MOSS' : ('Netscape.Mozilla_suite', 'Mozilla_suite'),
'TEXT' : ('Netscape.Text', 'Text'),
'WWW!' : ('Netscape.WorldWideWeb_suite', 'WorldWideWeb_suite'),
'ppnt' : ('Netscape.PowerPlant', 'PowerPlant'),
'reqd' : ('Netscape.Required_suite', 'Required_suite'),
}
from Standard_Suite import *
from Standard_URL_suite import *
from Mozilla_suite import *
from Text import *
from WorldWideWeb_suite import *
from PowerPlant import *
from Required_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(text)
getbaseclasses(styleset)
getbaseclasses(StdSuites.Text_Suite.character)
getbaseclasses(StdSuites.Text_Suite.text_flow)
getbaseclasses(StdSuites.Text_Suite.word)
getbaseclasses(StdSuites.Text_Suite.paragraph)
getbaseclasses(StdSuites.Text_Suite.text_style_info)
getbaseclasses(StdSuites.Text_Suite.line)
getbaseclasses(StdSuites.Text_Suite.text)
getbaseclasses(window)
getbaseclasses(application)
#
# Indices of types declared in this module
#
_classdeclarations = {
'ctxt' : text,
'stys' : styleset,
'cha ' : StdSuites.Text_Suite.character,
'cflo' : StdSuites.Text_Suite.text_flow,
'cwor' : StdSuites.Text_Suite.word,
'cpar' : StdSuites.Text_Suite.paragraph,
'tsty' : StdSuites.Text_Suite.text_style_info,
'clin' : StdSuites.Text_Suite.line,
'ctxt' : StdSuites.Text_Suite.text,
'cwin' : window,
'capp' : application,
}
class Netscape(Standard_Suite_Events,
Standard_URL_suite_Events,
Mozilla_suite_Events,
Text_Events,
WorldWideWeb_suite_Events,
PowerPlant_Events,
Required_suite_Events,
aetools.TalkTo):
_signature = 'MOSS'
_moduleName = 'Netscape'
_elemdict = application._elemdict
_propdict = application._propdict

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,373 @@
"""Suite Macintosh Connectivity Classes: Classes relating to Apple Macintosh personal computer connectivity
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'macc'
class Macintosh_Connectivity_Clas_Events:
pass
class ADB_address(aetools.ComponentItem):
"""ADB address - Addresses a device connected via Apple Desktop Bus """
want = 'cadb'
class _Prop__3c_inheritance_3e_(aetools.NProperty):
"""<inheritance> - inherits some of its properties from this class """
which = 'c@#^'
want = 'cadr'
class _Prop_ID(aetools.NProperty):
"""ID - the Apple Desktop Bus device ID """
which = 'ID '
want = 'shor'
ADB_addresses = ADB_address
class address_specification(aetools.ComponentItem):
"""address specification - Unique designation of a device or service connected to this computer """
want = 'cadr'
class _Prop_conduit(aetools.NProperty):
"""conduit - How the addressee is physically connected """
which = 'pcon'
want = 'econ'
class _Prop_properties(aetools.NProperty):
"""properties - property that allows getting and setting of multiple properties """
which = 'pALL'
want = 'reco'
class _Prop_protocol(aetools.NProperty):
"""protocol - How to talk to this addressee """
which = 'pprt'
want = 'epro'
address_specifications = address_specification
class AppleTalk_address(aetools.ComponentItem):
"""AppleTalk address - Addresses a device or service connected via the AppleTalk protocol """
want = 'cat '
class _Prop_AppleTalk_machine(aetools.NProperty):
"""AppleTalk machine - the machine name part of the address """
which = 'patm'
want = 'TEXT'
class _Prop_AppleTalk_type(aetools.NProperty):
"""AppleTalk type - the type part of the AppleTalk address """
which = 'patt'
want = 'TEXT'
class _Prop_AppleTalk_zone(aetools.NProperty):
"""AppleTalk zone - the zone part of the address """
which = 'patz'
want = 'TEXT'
AppleTalk_addresses = AppleTalk_address
class bus_slot(aetools.ComponentItem):
"""bus slot - Addresses a PC, PCI, or NuBus card """
want = 'cbus'
bus_slots = bus_slot
class device_specification(aetools.ComponentItem):
"""device specification - A device connected to a computer """
want = 'cdev'
class _Prop_device_address(aetools.NProperty):
"""device address - the address of the device """
which = 'pdva'
want = 'cadr'
class _Prop_device_type(aetools.NProperty):
"""device type - the kind of device """
which = 'pdvt'
want = 'edvt'
device_specifications = device_specification
class Ethernet_address(aetools.ComponentItem):
"""Ethernet address - Addresses a device by its Ethernet address """
want = 'cen '
Ethernet_addresses = Ethernet_address
class FireWire_address(aetools.ComponentItem):
"""FireWire address - Addresses a device on the FireWire bus """
want = 'cfw '
FireWire_addresses = FireWire_address
class IP_address(aetools.ComponentItem):
"""IP address - Addresses a device or service via the Internet Protocol (IP) """
want = 'cip '
class _Prop_DNS_form(aetools.NProperty):
"""DNS form - the address in the form "apple.com" """
which = 'pdns'
want = 'TEXT'
class _Prop_port(aetools.NProperty):
"""port - the port number of the service or client being addressed """
which = 'ppor'
want = 'TEXT'
IP_addresses = IP_address
class LocalTalk_address(aetools.ComponentItem):
"""LocalTalk address - Addresses a device by its LocalTalk address """
want = 'clt '
class _Prop_network(aetools.NProperty):
"""network - the LocalTalk network number """
which = 'pnet'
want = 'shor'
class _Prop_node(aetools.NProperty):
"""node - the LocalTalk node number """
which = 'pnod'
want = 'shor'
class _Prop_socket(aetools.NProperty):
"""socket - the LocalTalk socket number """
which = 'psoc'
want = 'shor'
LocalTalk_addresses = LocalTalk_address
class SCSI_address(aetools.ComponentItem):
"""SCSI address - Addresses a SCSI device """
want = 'cscs'
class _Prop_LUN(aetools.NProperty):
"""LUN - the SCSI logical unit number """
which = 'pslu'
want = 'shor'
class _Prop_SCSI_bus(aetools.NProperty):
"""SCSI bus - the SCSI bus number """
which = 'pscb'
want = 'shor'
SCSI_addresses = SCSI_address
class Token_Ring_address(aetools.ComponentItem):
"""Token Ring address - Addresses a device or service via the Token Ring protocol """
want = 'ctok'
Token_Ring_addresses = Token_Ring_address
class USB_address(aetools.ComponentItem):
"""USB address - Addresses a device on the Universal Serial Bus """
want = 'cusb'
class _Prop_name(aetools.NProperty):
"""name - the USB device name """
which = 'pnam'
want = 'TEXT'
USB_Addresses = USB_address
ADB_address._superclassnames = ['address_specification']
ADB_address._privpropdict = {
'ID' : _Prop_ID,
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
ADB_address._privelemdict = {
}
address_specification._superclassnames = []
address_specification._privpropdict = {
'conduit' : _Prop_conduit,
'properties' : _Prop_properties,
'protocol' : _Prop_protocol,
}
address_specification._privelemdict = {
}
AppleTalk_address._superclassnames = ['address_specification']
AppleTalk_address._privpropdict = {
'AppleTalk_machine' : _Prop_AppleTalk_machine,
'AppleTalk_type' : _Prop_AppleTalk_type,
'AppleTalk_zone' : _Prop_AppleTalk_zone,
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
AppleTalk_address._privelemdict = {
}
bus_slot._superclassnames = ['address_specification']
bus_slot._privpropdict = {
'ID' : _Prop_ID,
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
bus_slot._privelemdict = {
}
device_specification._superclassnames = []
device_specification._privpropdict = {
'device_address' : _Prop_device_address,
'device_type' : _Prop_device_type,
'properties' : _Prop_properties,
}
device_specification._privelemdict = {
}
Ethernet_address._superclassnames = ['address_specification']
Ethernet_address._privpropdict = {
'ID' : _Prop_ID,
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
Ethernet_address._privelemdict = {
}
FireWire_address._superclassnames = ['address_specification']
FireWire_address._privpropdict = {
'ID' : _Prop_ID,
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
FireWire_address._privelemdict = {
}
IP_address._superclassnames = ['address_specification']
IP_address._privpropdict = {
'DNS_form' : _Prop_DNS_form,
'ID' : _Prop_ID,
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
'port' : _Prop_port,
}
IP_address._privelemdict = {
}
LocalTalk_address._superclassnames = ['address_specification']
LocalTalk_address._privpropdict = {
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
'network' : _Prop_network,
'node' : _Prop_node,
'socket' : _Prop_socket,
}
LocalTalk_address._privelemdict = {
}
SCSI_address._superclassnames = ['address_specification']
SCSI_address._privpropdict = {
'ID' : _Prop_ID,
'LUN' : _Prop_LUN,
'SCSI_bus' : _Prop_SCSI_bus,
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
SCSI_address._privelemdict = {
}
Token_Ring_address._superclassnames = ['address_specification']
Token_Ring_address._privpropdict = {
'ID' : _Prop_ID,
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
Token_Ring_address._privelemdict = {
}
USB_address._superclassnames = ['address_specification']
USB_address._privpropdict = {
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
'name' : _Prop_name,
}
USB_address._privelemdict = {
}
_Enum_econ = {
'ADB' : 'eadb', #
'printer_port' : 'ecpp', #
'modem_port' : 'ecmp', #
'modem_printer_port' : 'empp', #
'LocalTalk' : 'eclt', #
'Ethernet' : 'ecen', #
'Token_Ring' : 'etok', #
'SCSI' : 'ecsc', #
'USB' : 'ecus', #
'FireWire' : 'ecfw', #
'infrared' : 'ecir', #
'PC_card' : 'ecpc', #
'PCI_bus' : 'ecpi', #
'NuBus' : 'enub', #
'PDS_slot' : 'ecpd', #
'Comm_slot' : 'eccm', #
'monitor_out' : 'ecmn', #
'video_out' : 'ecvo', #
'video_in' : 'ecvi', #
'audio_out' : 'ecao', #
'audio_line_in' : 'ecai', #
'audio_line_out' : 'ecal', #
'microphone' : 'ecmi', #
}
_Enum_edvt = {
'hard_disk_drive' : 'ehd ', #
'floppy_disk_drive' : 'efd ', #
'CD_ROM_drive' : 'ecd ', #
'DVD_drive' : 'edvd', #
'storage_device' : 'edst', #
'keyboard' : 'ekbd', #
'mouse' : 'emou', #
'trackball' : 'etrk', #
'trackpad' : 'edtp', #
'pointing_device' : 'edpd', #
'video_monitor' : 'edvm', #
'LCD_display' : 'edlc', #
'display' : 'edds', #
'modem' : 'edmm', #
'PC_card' : 'ecpc', #
'PCI_card' : 'edpi', #
'NuBus_card' : 'ednb', #
'printer' : 'edpr', #
'speakers' : 'edsp', #
'microphone' : 'ecmi', #
}
_Enum_epro = {
'serial' : 'epsr', #
'AppleTalk' : 'epat', #
'IP' : 'epip', #
'SCSI' : 'ecsc', #
'ADB' : 'eadb', #
'FireWire' : 'ecfw', #
'IrDA' : 'epir', #
'IRTalk' : 'epit', #
'USB' : 'ecus', #
'PC_card' : 'ecpc', #
'PCI_bus' : 'ecpi', #
'NuBus' : 'enub', #
'bus' : 'ebus', #
'Macintosh_video' : 'epmv', #
'SVGA' : 'epsg', #
'S_video' : 'epsv', #
'analog_audio' : 'epau', #
'digital_audio' : 'epda', #
'PostScript' : 'epps', #
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'cadb' : ADB_address,
'cadr' : address_specification,
'cat ' : AppleTalk_address,
'cbus' : bus_slot,
'cdev' : device_specification,
'cen ' : Ethernet_address,
'cfw ' : FireWire_address,
'cip ' : IP_address,
'clt ' : LocalTalk_address,
'cscs' : SCSI_address,
'ctok' : Token_Ring_address,
'cusb' : USB_address,
}
_propdeclarations = {
'ID ' : _Prop_ID,
'c@#^' : _Prop__3c_inheritance_3e_,
'pALL' : _Prop_properties,
'patm' : _Prop_AppleTalk_machine,
'patt' : _Prop_AppleTalk_type,
'patz' : _Prop_AppleTalk_zone,
'pcon' : _Prop_conduit,
'pdns' : _Prop_DNS_form,
'pdva' : _Prop_device_address,
'pdvt' : _Prop_device_type,
'pnam' : _Prop_name,
'pnet' : _Prop_network,
'pnod' : _Prop_node,
'ppor' : _Prop_port,
'pprt' : _Prop_protocol,
'pscb' : _Prop_SCSI_bus,
'pslu' : _Prop_LUN,
'psoc' : _Prop_socket,
}
_compdeclarations = {
}
_enumdeclarations = {
'econ' : _Enum_econ,
'edvt' : _Enum_edvt,
'epro' : _Enum_epro,
}

View File

@@ -0,0 +1,417 @@
"""Suite QuickDraw Graphics Suite: A set of basic classes for graphics
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'qdrw'
class QuickDraw_Graphics_Suite_Events:
pass
class arc(aetools.ComponentItem):
"""arc - An arc """
want = 'carc'
class _Prop_arc_angle(aetools.NProperty):
"""arc angle - the angle of the arc in degrees """
which = 'parc'
want = 'fixd'
class _Prop_bounds(aetools.NProperty):
"""bounds - the smallest rectangle that contains the entire arc """
which = 'pbnd'
want = 'qdrt'
class _Prop_definition_rect(aetools.NProperty):
"""definition rect - the rectangle that contains the circle or oval used to define the arc """
which = 'pdrt'
want = 'qdrt'
class _Prop_fill_color(aetools.NProperty):
"""fill color - the fill color """
which = 'flcl'
want = 'cRGB'
class _Prop_fill_pattern(aetools.NProperty):
"""fill pattern - the fill pattern """
which = 'flpt'
want = 'cpix'
class _Prop_pen_color(aetools.NProperty):
"""pen color - the pen color """
which = 'ppcl'
want = 'cRGB'
class _Prop_pen_pattern(aetools.NProperty):
"""pen pattern - the pen pattern """
which = 'pppa'
want = 'cpix'
class _Prop_pen_width(aetools.NProperty):
"""pen width - the pen width """
which = 'ppwd'
want = 'shor'
class _Prop_start_angle(aetools.NProperty):
"""start angle - the angle that defines the start of the arc, in degrees """
which = 'pang'
want = 'fixd'
class _Prop_transfer_mode(aetools.NProperty):
"""transfer mode - the transfer mode """
which = 'pptm'
want = 'tran'
arcs = arc
class drawing_area(aetools.ComponentItem):
"""drawing area - Container for graphics and supporting information """
want = 'cdrw'
class _Prop_background_color(aetools.NProperty):
"""background color - the color used to fill in unoccupied areas """
which = 'pbcl'
want = 'cRGB'
class _Prop_background_pattern(aetools.NProperty):
"""background pattern - the pattern used to fill in unoccupied areas """
which = 'pbpt'
want = 'cpix'
class _Prop_color_table(aetools.NProperty):
"""color table - the color table """
which = 'cltb'
want = 'clrt'
class _Prop_default_font(aetools.NProperty):
"""default font - the name of the default font for text objects """
which = 'ptxf'
want = 'itxt'
class _Prop_default_location(aetools.NProperty):
"""default location - the default location of each new graphic object """
which = 'pnel'
want = 'QDpt'
class _Prop_default_size(aetools.NProperty):
"""default size - the default size for text objects """
which = 'ptps'
want = 'fixd'
class _Prop_name(aetools.NProperty):
"""name - the name """
which = 'pnam'
want = 'itxt'
class _Prop_ordering(aetools.NProperty):
"""ordering - the ordered list of graphic objects in the drawing area """
which = 'gobs'
want = 'obj '
class _Prop_pixel_depth(aetools.NProperty):
"""pixel depth - the number of bits per pixel """
which = 'pdpt'
want = 'shor'
class _Prop_style(aetools.NProperty):
"""style - the default text style for text objects """
which = 'txst'
want = 'tsty'
class _Prop_text_color(aetools.NProperty):
"""text color - the default color for text objects """
which = 'ptxc'
want = 'cRGB'
class _Prop_update_on_change(aetools.NProperty):
"""update on change - Redraw after each change? """
which = 'pupd'
want = 'bool'
class _Prop_writing_code(aetools.NProperty):
"""writing code - the script system and language of text objects in the drawing area """
which = 'psct'
want = 'intl'
drawing_areas = drawing_area
class graphic_objects(aetools.ComponentItem):
"""graphic objects - """
want = 'cgob'
graphic_object = graphic_objects
class graphic_shapes(aetools.ComponentItem):
"""graphic shapes - """
want = 'cgsh'
graphic_shape = graphic_shapes
class graphic_text(aetools.ComponentItem):
"""graphic text - A series of characters within a drawing area """
want = 'cgtx'
class _Prop_color(aetools.NProperty):
"""color - the color of the first character """
which = 'colr'
want = 'cRGB'
class _Prop_font(aetools.NProperty):
"""font - the name of the font of the first character """
which = 'font'
want = 'ctxt'
class _Prop_size(aetools.NProperty):
"""size - the size in points of the first character """
which = 'ptsz'
want = 'fixd'
class _Prop_uniform_styles(aetools.NProperty):
"""uniform styles - the text styles that are uniform throughout the text """
which = 'ustl'
want = 'tsty'
class ovals(aetools.ComponentItem):
"""ovals - """
want = 'covl'
oval = ovals
class polygon(aetools.ComponentItem):
"""polygon - A polygon """
want = 'cpgn'
class _Prop_point_list(aetools.NProperty):
"""point list - the list of points that define the polygon """
which = 'ptlt'
want = 'QDpt'
polygons = polygon
class graphic_groups(aetools.ComponentItem):
"""graphic groups - """
want = 'cpic'
graphic_group = graphic_groups
class pixel_maps(aetools.ComponentItem):
"""pixel maps - """
want = 'cpix'
pixel_map = pixel_maps
class pixel(aetools.ComponentItem):
"""pixel - A pixel """
want = 'cpxl'
pixels = pixel
class rectangles(aetools.ComponentItem):
"""rectangles - """
want = 'crec'
rectangle = rectangles
class rounded_rectangle(aetools.ComponentItem):
"""rounded rectangle - A rounded rectangle """
want = 'crrc'
class _Prop_corner_curve_height(aetools.NProperty):
"""corner curve height - the height of the oval used to define the shape of the rounded corners """
which = 'pchd'
want = 'shor'
class _Prop_corner_curve_width(aetools.NProperty):
"""corner curve width - the width of the oval used to define the shape of the rounded corners """
which = 'pcwd'
want = 'shor'
rounded_rectangles = rounded_rectangle
class graphic_line(aetools.ComponentItem):
"""graphic line - A graphic line """
want = 'glin'
class _Prop_arrow_style(aetools.NProperty):
"""arrow style - the arrow style """
which = 'arro'
want = 'arro'
class _Prop_dash_style(aetools.NProperty):
"""dash style - the dash style """
which = 'pdst'
want = 'tdas'
class _Prop_end_point(aetools.NProperty):
"""end point - the ending point of the line """
which = 'pend'
want = 'QDpt'
class _Prop_start_point(aetools.NProperty):
"""start point - the starting point of the line """
which = 'pstp'
want = 'QDpt'
graphic_lines = graphic_line
arc._superclassnames = []
arc._privpropdict = {
'arc_angle' : _Prop_arc_angle,
'bounds' : _Prop_bounds,
'definition_rect' : _Prop_definition_rect,
'fill_color' : _Prop_fill_color,
'fill_pattern' : _Prop_fill_pattern,
'pen_color' : _Prop_pen_color,
'pen_pattern' : _Prop_pen_pattern,
'pen_width' : _Prop_pen_width,
'start_angle' : _Prop_start_angle,
'transfer_mode' : _Prop_transfer_mode,
}
arc._privelemdict = {
}
drawing_area._superclassnames = []
drawing_area._privpropdict = {
'background_color' : _Prop_background_color,
'background_pattern' : _Prop_background_pattern,
'color_table' : _Prop_color_table,
'default_font' : _Prop_default_font,
'default_location' : _Prop_default_location,
'default_size' : _Prop_default_size,
'name' : _Prop_name,
'ordering' : _Prop_ordering,
'pixel_depth' : _Prop_pixel_depth,
'style' : _Prop_style,
'text_color' : _Prop_text_color,
'update_on_change' : _Prop_update_on_change,
'writing_code' : _Prop_writing_code,
}
drawing_area._privelemdict = {
}
graphic_objects._superclassnames = []
graphic_objects._privpropdict = {
}
graphic_objects._privelemdict = {
}
graphic_shapes._superclassnames = []
graphic_shapes._privpropdict = {
}
graphic_shapes._privelemdict = {
}
graphic_text._superclassnames = []
graphic_text._privpropdict = {
'color' : _Prop_color,
'font' : _Prop_font,
'size' : _Prop_size,
'uniform_styles' : _Prop_uniform_styles,
}
graphic_text._privelemdict = {
}
ovals._superclassnames = []
ovals._privpropdict = {
}
ovals._privelemdict = {
}
polygon._superclassnames = []
polygon._privpropdict = {
'point_list' : _Prop_point_list,
}
polygon._privelemdict = {
}
graphic_groups._superclassnames = []
graphic_groups._privpropdict = {
}
graphic_groups._privelemdict = {
}
pixel_maps._superclassnames = []
pixel_maps._privpropdict = {
}
pixel_maps._privelemdict = {
}
pixel._superclassnames = []
pixel._privpropdict = {
'color' : _Prop_color,
}
pixel._privelemdict = {
}
rectangles._superclassnames = []
rectangles._privpropdict = {
}
rectangles._privelemdict = {
}
rounded_rectangle._superclassnames = []
rounded_rectangle._privpropdict = {
'corner_curve_height' : _Prop_corner_curve_height,
'corner_curve_width' : _Prop_corner_curve_width,
}
rounded_rectangle._privelemdict = {
}
graphic_line._superclassnames = []
graphic_line._privpropdict = {
'arrow_style' : _Prop_arrow_style,
'dash_style' : _Prop_dash_style,
'end_point' : _Prop_end_point,
'start_point' : _Prop_start_point,
}
graphic_line._privelemdict = {
}
_Enum_arro = {
'no_arrow' : 'arno', # No arrow on line
'arrow_at_start' : 'arst', # Arrow at start of line
'arrow_at_end' : 'aren', # Arrow at end of line
'arrow_at_both_ends' : 'arbo', # Arrow at both the start and the end of the line
}
_Enum_tran = {
'copy_pixels' : 'cpy ', #
'not_copy_pixels' : 'ncpy', #
'or_pixels' : 'or ', #
'not_or_pixels' : 'ntor', #
'bic_pixels' : 'bic ', #
'not_bic_pixels' : 'nbic', #
'xor_pixels' : 'xor ', #
'not_xor_pixels' : 'nxor', #
'add_over_pixels' : 'addo', #
'add_pin_pixels' : 'addp', #
'sub_over_pixels' : 'subo', #
'sub_pin_pixels' : 'subp', #
'ad_max_pixels' : 'admx', #
'ad_min_pixels' : 'admn', #
'blend_pixels' : 'blnd', #
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'carc' : arc,
'cdrw' : drawing_area,
'cgob' : graphic_objects,
'cgsh' : graphic_shapes,
'cgtx' : graphic_text,
'covl' : ovals,
'cpgn' : polygon,
'cpic' : graphic_groups,
'cpix' : pixel_maps,
'cpxl' : pixel,
'crec' : rectangles,
'crrc' : rounded_rectangle,
'glin' : graphic_line,
}
_propdeclarations = {
'arro' : _Prop_arrow_style,
'cltb' : _Prop_color_table,
'colr' : _Prop_color,
'flcl' : _Prop_fill_color,
'flpt' : _Prop_fill_pattern,
'font' : _Prop_font,
'gobs' : _Prop_ordering,
'pang' : _Prop_start_angle,
'parc' : _Prop_arc_angle,
'pbcl' : _Prop_background_color,
'pbnd' : _Prop_bounds,
'pbpt' : _Prop_background_pattern,
'pchd' : _Prop_corner_curve_height,
'pcwd' : _Prop_corner_curve_width,
'pdpt' : _Prop_pixel_depth,
'pdrt' : _Prop_definition_rect,
'pdst' : _Prop_dash_style,
'pend' : _Prop_end_point,
'pnam' : _Prop_name,
'pnel' : _Prop_default_location,
'ppcl' : _Prop_pen_color,
'pppa' : _Prop_pen_pattern,
'pptm' : _Prop_transfer_mode,
'ppwd' : _Prop_pen_width,
'psct' : _Prop_writing_code,
'pstp' : _Prop_start_point,
'ptlt' : _Prop_point_list,
'ptps' : _Prop_default_size,
'ptsz' : _Prop_size,
'ptxc' : _Prop_text_color,
'ptxf' : _Prop_default_font,
'pupd' : _Prop_update_on_change,
'txst' : _Prop_style,
'ustl' : _Prop_uniform_styles,
}
_compdeclarations = {
}
_enumdeclarations = {
'arro' : _Enum_arro,
'tran' : _Enum_tran,
}

View File

@@ -0,0 +1,73 @@
"""Suite QuickDraw Graphics Supplemental Suite: Defines transformations of graphic objects
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'qdsp'
class QuickDraw_Graphics_Suppleme_Events:
pass
class drawing_area(aetools.ComponentItem):
"""drawing area - Container for graphics and supporting information """
want = 'cdrw'
class _Prop_rotation(aetools.NProperty):
"""rotation - the default rotation for objects in the drawing area """
which = 'prot'
want = 'trot'
class _Prop_scale(aetools.NProperty):
"""scale - the default scaling for objects in the drawing area """
which = 'pscl'
want = 'fixd'
class _Prop_translation(aetools.NProperty):
"""translation - the default repositioning for objects in the drawing area """
which = 'ptrs'
want = 'QDpt'
drawing_areas = drawing_area
class graphic_groups(aetools.ComponentItem):
"""graphic groups - """
want = 'cpic'
graphic_group = graphic_groups
drawing_area._superclassnames = []
drawing_area._privpropdict = {
'rotation' : _Prop_rotation,
'scale' : _Prop_scale,
'translation' : _Prop_translation,
}
drawing_area._privelemdict = {
}
graphic_groups._superclassnames = []
graphic_groups._privpropdict = {
}
graphic_groups._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'cdrw' : drawing_area,
'cpic' : graphic_groups,
}
_propdeclarations = {
'prot' : _Prop_rotation,
'pscl' : _Prop_scale,
'ptrs' : _Prop_translation,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,32 @@
"""Suite Required Suite: Every application supports open, print, run, and quit
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'reqd'
from _builtinSuites.builtin_Suite import *
class Required_Suite_Events(builtin_Suite_Events):
pass
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,738 @@
"""Suite Standard Suite: Common terms for most applications
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'core'
from _builtinSuites.builtin_Suite import *
class Standard_Suite_Events(builtin_Suite_Events):
_argmap_class_info = {
'in_' : 'wrcd',
}
def class_info(self, _object=None, _attributes={}, **_arguments):
"""class info: (optional) Get information about an object class
Required argument: the object class about which information is requested
Keyword argument in_: the human language and script system in which to return information
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: a record containing the object\xd5s properties and elements
"""
_code = 'core'
_subcode = 'qobj'
aetools.keysubst(_arguments, self._argmap_class_info)
_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_close = {
'saving' : 'savo',
'saving_in' : 'kfil',
}
def close(self, _object, _attributes={}, **_arguments):
"""close: Close an object
Required argument: the object to close
Keyword argument saving: specifies whether changes should be saved before closing
Keyword argument saving_in: the file or alias in which to save the object
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 an object
Required argument: the object whose elements are to be counted
Keyword argument each: if specified, restricts counting to objects of this class
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the number of elements
"""
_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['----']
_argmap_data_size = {
'as' : 'rtyp',
}
def data_size(self, _object, _attributes={}, **_arguments):
"""data size: (optional) Return the size in bytes of an object
Required argument: the object whose data size is to be returned
Keyword argument as: the data type for which the size is calculated
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the size of the object in bytes
"""
_code = 'core'
_subcode = 'dsiz'
aetools.keysubst(_arguments, self._argmap_data_size)
_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 from its container. Note this does not work on script variables, only on elements of application classes.
Required argument: the element to delete
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: Duplicate one or more objects
Required argument: the object(s) to duplicate
Keyword argument to: the new location for the object(s)
Keyword argument with_properties: the initial values for properties of the new object that are to be different from the original
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: to the duplicated object(s)
"""
_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['----']
_argmap_event_info = {
'in_' : 'wrcd',
}
def event_info(self, _object, _attributes={}, **_arguments):
"""event info: (optional) Get information about the Apple events in a suite
Required argument: the event class of the Apple events for which to return information
Keyword argument in_: the human language and script system in which to return information
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: a record containing the events and their parameters
"""
_code = 'core'
_subcode = 'gtei'
aetools.keysubst(_arguments, self._argmap_event_info)
_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 in question
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: true if it exists, false if not
"""
_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 handleBreakpoint(self, _object, _attributes={}, **_arguments):
"""handleBreakpoint: return true to stop at a breakpoint
Required argument: the call frame of the breakpoint
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: true to stop, false if not
"""
_code = 'core'
_subcode = 'brak'
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 = {
'new' : 'kocl',
'at' : 'insh',
'with_data' : 'data',
'with_properties' : 'prdt',
}
def make(self, _no_object=None, _attributes={}, **_arguments):
"""make: Make a new element
Keyword argument new: the class of the new element
Keyword argument at: the location at which to insert the element
Keyword argument with_data: the initial data for the element
Keyword argument with_properties: the initial values for the properties of the element
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: to the new object(s)
"""
_code = 'core'
_subcode = 'crel'
aetools.keysubst(_arguments, self._argmap_make)
if _no_object is not 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(s) to move
Keyword argument to: the new location for the object(s)
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: to the object(s) after they have been moved
"""
_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, _attributes={}, **_arguments):
"""open: Open the specified object(s)
Required argument: list of objects to open
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, _attributes={}, **_arguments):
"""print: Print the specified object(s)
Required argument: list of objects to print
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, _no_object=None, _attributes={}, **_arguments):
"""quit: Quit an application
Keyword argument saving: specifies whether to save currently open documents
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'quit'
aetools.keysubst(_arguments, self._argmap_quit)
if _no_object is not None: raise TypeError, 'No direct arg expected'
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['----']
def reopen(self, _no_object=None, _attributes={}, **_arguments):
"""reopen: Reactivate a running application. Some applications will open a new untitled window if no window is open.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'rapp'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def run(self, _no_object=None, _attributes={}, **_arguments):
"""run: Run an application. Most applications will open an empty, untitled window.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'oapp'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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_save = {
'in_' : 'kfil',
'as' : 'fltp',
}
def save(self, _object, _attributes={}, **_arguments):
"""save: Save an object
Required argument: the object to save, usually a document or window
Keyword argument in_: the file or alias in which to save the object
Keyword argument as: the file type of the document 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['----']
def select(self, _object, _attributes={}, **_arguments):
"""select: Make a selection
Required argument: the object to select
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'misc'
_subcode = 'slct'
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_suite_info = {
'in_' : 'wrcd',
}
def suite_info(self, _object, _attributes={}, **_arguments):
"""suite info: (optional) Get information about event suite(s)
Required argument: the suite for which to return information
Keyword argument in_: the human language and script system in which to return information
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: a record containing the suites and their versions
"""
_code = 'core'
_subcode = 'gtsi'
aetools.keysubst(_arguments, self._argmap_suite_info)
_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 alias(aetools.ComponentItem):
"""alias - a file on a disk or server. The file must exist when you check the syntax of your script. """
want = 'alis'
class _Prop_POSIX_path(aetools.NProperty):
"""POSIX path - the POSIX path of the file """
which = 'psxp'
want = 'TEXT'
aliases = alias
class application(aetools.ComponentItem):
"""application - An application program """
want = 'capp'
class _Prop_clipboard(aetools.NProperty):
"""clipboard - the contents of the clipboard for this application """
which = 'pcli'
want = '****'
clipboard = _Prop_clipboard()
class _Prop_frontmost(aetools.NProperty):
"""frontmost - Is this the frontmost application? """
which = 'pisf'
want = 'bool'
frontmost = _Prop_frontmost()
class _Prop_name(aetools.NProperty):
"""name - the name of the application """
which = 'pnam'
want = 'itxt'
name = _Prop_name()
class _Prop_selection(aetools.NProperty):
"""selection - the selection visible to the user. Use the \xd4select\xd5 command to set a new selection; use \xd4contents of selection\xd5 to get or change information in the document. """
which = 'sele'
want = 'csel'
selection = _Prop_selection()
class _Prop_version(aetools.NProperty):
"""version - the version of the application """
which = 'vers'
want = 'vers'
version = _Prop_version()
applications = application
class insertion_points(aetools.ComponentItem):
"""insertion points - """
want = 'cins'
insertion_point = insertion_points
class selection_2d_object(aetools.ComponentItem):
"""selection-object - A way to refer to the state of the current of the selection. Use the \xd4select\xd5 command to make a new selection. """
want = 'csel'
class _Prop_contents(aetools.NProperty):
"""contents - the information currently selected. Use \xd4contents of selection\xd5 to get or change information in a document. """
which = 'pcnt'
want = '****'
class window(aetools.ComponentItem):
"""window - A window """
want = 'cwin'
class _Prop_bounds(aetools.NProperty):
"""bounds - the boundary rectangle for the window """
which = 'pbnd'
want = 'qdrt'
class _Prop_closeable(aetools.NProperty):
"""closeable - Does the window have a close box? """
which = 'hclb'
want = 'bool'
class _Prop_floating(aetools.NProperty):
"""floating - Does the window float? """
which = 'isfl'
want = 'bool'
class _Prop_index(aetools.NProperty):
"""index - the number of the window """
which = 'pidx'
want = 'long'
class _Prop_modal(aetools.NProperty):
"""modal - Is the window modal? """
which = 'pmod'
want = 'bool'
class _Prop_resizable(aetools.NProperty):
"""resizable - Is the window resizable? """
which = 'prsz'
want = 'bool'
class _Prop_titled(aetools.NProperty):
"""titled - Does the window have a title bar? """
which = 'ptit'
want = 'bool'
class _Prop_visible(aetools.NProperty):
"""visible - Is the window visible? """
which = 'pvis'
want = 'bool'
class _Prop_zoomable(aetools.NProperty):
"""zoomable - Is the window zoomable? """
which = 'iszm'
want = 'bool'
class _Prop_zoomed(aetools.NProperty):
"""zoomed - Is the window zoomed? """
which = 'pzum'
want = 'bool'
windows = window
class document(aetools.ComponentItem):
"""document - A document of a scriptable application """
want = 'docu'
class _Prop_modified(aetools.NProperty):
"""modified - Has the document been modified since the last save? """
which = 'imod'
want = 'bool'
documents = document
class file(aetools.ComponentItem):
"""file - a file on a disk or server """
want = 'file'
files = file
alias._superclassnames = []
alias._privpropdict = {
'POSIX_path' : _Prop_POSIX_path,
}
alias._privelemdict = {
}
application._superclassnames = []
application._privpropdict = {
'clipboard' : _Prop_clipboard,
'frontmost' : _Prop_frontmost,
'name' : _Prop_name,
'selection' : _Prop_selection,
'version' : _Prop_version,
}
application._privelemdict = {
}
insertion_points._superclassnames = []
insertion_points._privpropdict = {
}
insertion_points._privelemdict = {
}
selection_2d_object._superclassnames = []
selection_2d_object._privpropdict = {
'contents' : _Prop_contents,
}
selection_2d_object._privelemdict = {
}
window._superclassnames = []
window._privpropdict = {
'bounds' : _Prop_bounds,
'closeable' : _Prop_closeable,
'floating' : _Prop_floating,
'index' : _Prop_index,
'modal' : _Prop_modal,
'resizable' : _Prop_resizable,
'titled' : _Prop_titled,
'visible' : _Prop_visible,
'zoomable' : _Prop_zoomable,
'zoomed' : _Prop_zoomed,
}
window._privelemdict = {
}
document._superclassnames = []
document._privpropdict = {
'modified' : _Prop_modified,
}
document._privelemdict = {
}
file._superclassnames = []
file._privpropdict = {
'POSIX_path' : _Prop_POSIX_path,
}
file._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_kfrm = {
'index' : 'indx', # keyform designating indexed access
'named' : 'name', # keyform designating named access
'id' : 'ID ', # keyform designating access by unique identifier
}
_Enum_savo = {
'yes' : 'yes ', # Save objects now
'no' : 'no ', # Do not save objects
'ask' : 'ask ', # Ask the user whether to save
}
_Enum_styl = {
'plain' : 'plan', # Plain
'bold' : 'bold', # Bold
'italic' : 'ital', # Italic
'outline' : 'outl', # Outline
'shadow' : 'shad', # Shadow
'underline' : 'undl', # Underline
'superscript' : 'spsc', # Superscript
'subscript' : 'sbsc', # Subscript
'strikethrough' : 'strk', # Strikethrough
'small_caps' : 'smcp', # Small caps
'all_caps' : 'alcp', # All capital letters
'all_lowercase' : 'lowc', # Lowercase
'condensed' : 'cond', # Condensed
'expanded' : 'pexp', # Expanded
'hidden' : 'hidn', # Hidden
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'alis' : alias,
'capp' : application,
'cins' : insertion_points,
'csel' : selection_2d_object,
'cwin' : window,
'docu' : document,
'file' : file,
}
_propdeclarations = {
'hclb' : _Prop_closeable,
'imod' : _Prop_modified,
'isfl' : _Prop_floating,
'iszm' : _Prop_zoomable,
'pbnd' : _Prop_bounds,
'pcli' : _Prop_clipboard,
'pcnt' : _Prop_contents,
'pidx' : _Prop_index,
'pisf' : _Prop_frontmost,
'pmod' : _Prop_modal,
'pnam' : _Prop_name,
'prsz' : _Prop_resizable,
'psxp' : _Prop_POSIX_path,
'ptit' : _Prop_titled,
'pvis' : _Prop_visible,
'pzum' : _Prop_zoomed,
'sele' : _Prop_selection,
'vers' : _Prop_version,
}
_compdeclarations = {
'< ' : _3c_,
'<= ' : _b2_,
'= ' : _3d_,
'> ' : _3e_,
'>= ' : _b3_,
'bgwt' : starts_with,
'cont' : contains,
'ends' : ends_with,
}
_enumdeclarations = {
'kfrm' : _Enum_kfrm,
'savo' : _Enum_savo,
'styl' : _Enum_styl,
}

View File

@@ -0,0 +1,104 @@
"""Suite Table Suite: Classes for manipulating tables
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'tbls'
class Table_Suite_Events:
pass
class cell(aetools.ComponentItem):
"""cell - A cell """
want = 'ccel'
class _Prop_formula(aetools.NProperty):
"""formula - the formula of the cell """
which = 'pfor'
want = 'ctxt'
class _Prop_protection(aetools.NProperty):
"""protection - Indicates whether value or formula in the cell can be changed """
which = 'ppro'
want = 'prtn'
cells = cell
class column(aetools.ComponentItem):
"""column - A column """
want = 'ccol'
class _Prop_name(aetools.NProperty):
"""name - the name of the column """
which = 'pnam'
want = 'itxt'
columns = column
class rows(aetools.ComponentItem):
"""rows - """
want = 'crow'
row = rows
class tables(aetools.ComponentItem):
"""tables - """
want = 'ctbl'
table = tables
cell._superclassnames = []
cell._privpropdict = {
'formula' : _Prop_formula,
'protection' : _Prop_protection,
}
cell._privelemdict = {
}
column._superclassnames = []
column._privpropdict = {
'name' : _Prop_name,
}
column._privelemdict = {
}
rows._superclassnames = []
rows._privpropdict = {
}
rows._privelemdict = {
}
tables._superclassnames = []
tables._privpropdict = {
}
tables._privelemdict = {
}
_Enum_prtn = {
'read_only' : 'nmod', # Can\xd5t change values or formulas
'formulas_protected' : 'fpro', # Can changes values but not formulas
'read_2f_write' : 'modf', # Can change values and formulas
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'ccel' : cell,
'ccol' : column,
'crow' : rows,
'ctbl' : tables,
}
_propdeclarations = {
'pfor' : _Prop_formula,
'pnam' : _Prop_name,
'ppro' : _Prop_protection,
}
_compdeclarations = {
}
_enumdeclarations = {
'prtn' : _Enum_prtn,
}

View File

@@ -0,0 +1,224 @@
"""Suite Text Suite: A set of basic classes for text processing
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'TEXT'
class Text_Suite_Events:
pass
class text_flow(aetools.ComponentItem):
"""text flow - A contiguous block of text. Page layout applications call this a \xd4story.\xd5 """
want = 'cflo'
class _Prop__3c_inheritance_3e_(aetools.NProperty):
"""<inheritance> - inherits some of its properties from this class """
which = 'c@#^'
want = 'ctxt'
class _Prop_name(aetools.NProperty):
"""name - the name """
which = 'pnam'
want = 'itxt'
text_flows = text_flow
class character(aetools.ComponentItem):
"""character - A character """
want = 'cha '
class line(aetools.ComponentItem):
"""line - A line of text """
want = 'clin'
class _Prop_justification(aetools.NProperty):
"""justification - the justification of the text """
which = 'pjst'
want = 'just'
lines = line
class paragraph(aetools.ComponentItem):
"""paragraph - A paragraph """
want = 'cpar'
paragraphs = paragraph
class text(aetools.ComponentItem):
"""text - Text """
want = 'ctxt'
class _Prop_color(aetools.NProperty):
"""color - the color of the first character """
which = 'colr'
want = 'cRGB'
class _Prop_font(aetools.NProperty):
"""font - the name of the font of the first character """
which = 'font'
want = 'ctxt'
class _Prop_quoted_form(aetools.NProperty):
"""quoted form - the text in quoted form """
which = 'strq'
want = 'ctxt'
class _Prop_size(aetools.NProperty):
"""size - the size in points of the first character """
which = 'ptsz'
want = 'fixd'
class _Prop_style(aetools.NProperty):
"""style - the text style of the first character of the first character """
which = 'txst'
want = 'tsty'
class _Prop_uniform_styles(aetools.NProperty):
"""uniform styles - the text styles that are uniform throughout the text """
which = 'ustl'
want = 'tsty'
class _Prop_writing_code(aetools.NProperty):
"""writing code - the script system and language """
which = 'psct'
want = 'intl'
# element 'cha ' as ['indx']
# element 'clin' as ['indx']
# element 'cpar' as ['indx']
# element 'ctxt' as ['indx']
# element 'cwor' as ['indx']
class word(aetools.ComponentItem):
"""word - A word """
want = 'cwor'
words = word
class text_style_info(aetools.ComponentItem):
"""text style info - On and Off styles of text run """
want = 'tsty'
class _Prop_off_styles(aetools.NProperty):
"""off styles - the styles that are off for the text """
which = 'ofst'
want = 'styl'
class _Prop_on_styles(aetools.NProperty):
"""on styles - the styles that are on for the text """
which = 'onst'
want = 'styl'
text_style_infos = text_style_info
text_flow._superclassnames = ['text']
text_flow._privpropdict = {
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
'name' : _Prop_name,
}
text_flow._privelemdict = {
}
character._superclassnames = ['text']
character._privpropdict = {
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
character._privelemdict = {
}
line._superclassnames = ['text']
line._privpropdict = {
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
'justification' : _Prop_justification,
}
line._privelemdict = {
}
paragraph._superclassnames = ['text']
paragraph._privpropdict = {
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
paragraph._privelemdict = {
}
text._superclassnames = []
text._privpropdict = {
'color' : _Prop_color,
'font' : _Prop_font,
'quoted_form' : _Prop_quoted_form,
'size' : _Prop_size,
'style' : _Prop_style,
'uniform_styles' : _Prop_uniform_styles,
'writing_code' : _Prop_writing_code,
}
text._privelemdict = {
'character' : character,
'line' : line,
'paragraph' : paragraph,
'text' : text,
'word' : word,
}
word._superclassnames = ['text']
word._privpropdict = {
'_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
}
word._privelemdict = {
}
text_style_info._superclassnames = []
text_style_info._privpropdict = {
'off_styles' : _Prop_off_styles,
'on_styles' : _Prop_on_styles,
}
text_style_info._privelemdict = {
}
_Enum_just = {
'left' : 'left', # Align with left margin
'right' : 'rght', # Align with right margin
'center' : 'cent', # Align with center
'full' : 'full', # Align with both left and right margins
}
_Enum_styl = {
'plain' : 'plan', # Plain
'bold' : 'bold', # Bold
'italic' : 'ital', # Italic
'outline' : 'outl', # Outline
'shadow' : 'shad', # Shadow
'underline' : 'undl', # Underline
'superscript' : 'spsc', # Superscript
'subscript' : 'sbsc', # Subscript
'strikethrough' : 'strk', # Strikethrough
'small_caps' : 'smcp', # Small caps
'all_caps' : 'alcp', # All capital letters
'all_lowercase' : 'lowc', # Lowercase
'condensed' : 'cond', # Condensed
'expanded' : 'pexp', # Expanded
'hidden' : 'hidn', # Hidden
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'cflo' : text_flow,
'cha ' : character,
'clin' : line,
'cpar' : paragraph,
'ctxt' : text,
'cwor' : word,
'tsty' : text_style_info,
}
_propdeclarations = {
'c@#^' : _Prop__3c_inheritance_3e_,
'colr' : _Prop_color,
'font' : _Prop_font,
'ofst' : _Prop_off_styles,
'onst' : _Prop_on_styles,
'pjst' : _Prop_justification,
'pnam' : _Prop_name,
'psct' : _Prop_writing_code,
'ptsz' : _Prop_size,
'strq' : _Prop_quoted_form,
'txst' : _Prop_style,
'ustl' : _Prop_uniform_styles,
}
_compdeclarations = {
}
_enumdeclarations = {
'just' : _Enum_just,
'styl' : _Enum_styl,
}

View File

@@ -0,0 +1,435 @@
"""Suite Type Names Suite: Terminology for Registry data types
Level 1, version 1
Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'tpnm'
class Type_Names_Suite_Events:
pass
class PostScript_picture(aetools.ComponentItem):
"""PostScript picture - """
want = 'EPS '
class point(aetools.ComponentItem):
"""point - point coordinates """
want = 'QDpt'
class string(aetools.ComponentItem):
"""string - a string of characters """
want = 'TEXT'
plain_text = string
plain_text = string
class TIFF_picture(aetools.ComponentItem):
"""TIFF picture - """
want = 'TIFF'
class application_dictionary(aetools.ComponentItem):
"""application dictionary - """
want = 'aete'
class system_dictionary(aetools.ComponentItem):
"""system dictionary - """
want = 'aeut'
class color_table(aetools.ComponentItem):
"""color table - """
want = 'clrt'
class menu_item(aetools.ComponentItem):
"""menu item - """
want = 'cmen'
class menu(aetools.ComponentItem):
"""menu - """
want = 'cmnu'
class double_integer(aetools.ComponentItem):
"""double integer - """
want = 'comp'
class type_element_info(aetools.ComponentItem):
"""type element info - """
want = 'elin'
class type_event_info(aetools.ComponentItem):
"""type event info - information about an event """
want = 'evin'
class extended_real(aetools.ComponentItem):
"""extended real - """
want = 'exte'
class fixed(aetools.ComponentItem):
"""fixed - a real number """
want = 'fixd'
class fixed_point(aetools.ComponentItem):
"""fixed point - """
want = 'fpnt'
class fixed_rectangle(aetools.ComponentItem):
"""fixed rectangle - """
want = 'frct'
class type_class_info(aetools.ComponentItem):
"""type class info - information about properties and elements of a class """
want = 'gcli'
class location_reference(aetools.ComponentItem):
"""location reference - """
want = 'insl'
class long_fixed_point(aetools.ComponentItem):
"""long fixed point - """
want = 'lfpt'
class long_fixed_rectangle(aetools.ComponentItem):
"""long fixed rectangle - """
want = 'lfrc'
class long_fixed(aetools.ComponentItem):
"""long fixed - """
want = 'lfxd'
class long_point(aetools.ComponentItem):
"""long point - """
want = 'lpnt'
class long_rectangle(aetools.ComponentItem):
"""long rectangle - """
want = 'lrct'
class machine_location(aetools.ComponentItem):
"""machine location - """
want = 'mLoc'
class unsigned_integer(aetools.ComponentItem):
"""unsigned integer - """
want = 'magn'
class null(aetools.ComponentItem):
"""null - """
want = 'null'
class type_property_info(aetools.ComponentItem):
"""type property info - """
want = 'pinf'
class type_parameter_info(aetools.ComponentItem):
"""type parameter info - """
want = 'pmin'
class bounding_rectangle(aetools.ComponentItem):
"""bounding rectangle - bounding rectangle """
want = 'qdrt'
class small_integer(aetools.ComponentItem):
"""small integer - """
want = 'shor'
class small_real(aetools.ComponentItem):
"""small real - """
want = 'sing'
class scrap_styles(aetools.ComponentItem):
"""scrap styles - """
want = 'styl'
class type_suite_info(aetools.ComponentItem):
"""type suite info - """
want = 'suin'
class target_id(aetools.ComponentItem):
"""target id - """
want = 'targ'
class dash_style(aetools.ComponentItem):
"""dash style - """
want = 'tdas'
class pixel_map_record(aetools.ComponentItem):
"""pixel map record - """
want = 'tpmm'
class RGB16_color(aetools.ComponentItem):
"""RGB16 color - """
want = 'tr16'
class RGB96_color(aetools.ComponentItem):
"""RGB96 color - """
want = 'tr96'
class rotation(aetools.ComponentItem):
"""rotation - """
want = 'trot'
class version(aetools.ComponentItem):
"""version - """
want = 'vers'
PostScript_picture._superclassnames = []
PostScript_picture._privpropdict = {
}
PostScript_picture._privelemdict = {
}
point._superclassnames = []
point._privpropdict = {
}
point._privelemdict = {
}
string._superclassnames = []
string._privpropdict = {
}
string._privelemdict = {
}
TIFF_picture._superclassnames = []
TIFF_picture._privpropdict = {
}
TIFF_picture._privelemdict = {
}
application_dictionary._superclassnames = []
application_dictionary._privpropdict = {
}
application_dictionary._privelemdict = {
}
system_dictionary._superclassnames = []
system_dictionary._privpropdict = {
}
system_dictionary._privelemdict = {
}
color_table._superclassnames = []
color_table._privpropdict = {
}
color_table._privelemdict = {
}
menu_item._superclassnames = []
menu_item._privpropdict = {
}
menu_item._privelemdict = {
}
menu._superclassnames = []
menu._privpropdict = {
}
menu._privelemdict = {
}
double_integer._superclassnames = []
double_integer._privpropdict = {
}
double_integer._privelemdict = {
}
type_element_info._superclassnames = []
type_element_info._privpropdict = {
}
type_element_info._privelemdict = {
}
type_event_info._superclassnames = []
type_event_info._privpropdict = {
}
type_event_info._privelemdict = {
}
extended_real._superclassnames = []
extended_real._privpropdict = {
}
extended_real._privelemdict = {
}
fixed._superclassnames = []
fixed._privpropdict = {
}
fixed._privelemdict = {
}
fixed_point._superclassnames = []
fixed_point._privpropdict = {
}
fixed_point._privelemdict = {
}
fixed_rectangle._superclassnames = []
fixed_rectangle._privpropdict = {
}
fixed_rectangle._privelemdict = {
}
type_class_info._superclassnames = []
type_class_info._privpropdict = {
}
type_class_info._privelemdict = {
}
location_reference._superclassnames = []
location_reference._privpropdict = {
}
location_reference._privelemdict = {
}
long_fixed_point._superclassnames = []
long_fixed_point._privpropdict = {
}
long_fixed_point._privelemdict = {
}
long_fixed_rectangle._superclassnames = []
long_fixed_rectangle._privpropdict = {
}
long_fixed_rectangle._privelemdict = {
}
long_fixed._superclassnames = []
long_fixed._privpropdict = {
}
long_fixed._privelemdict = {
}
long_point._superclassnames = []
long_point._privpropdict = {
}
long_point._privelemdict = {
}
long_rectangle._superclassnames = []
long_rectangle._privpropdict = {
}
long_rectangle._privelemdict = {
}
machine_location._superclassnames = []
machine_location._privpropdict = {
}
machine_location._privelemdict = {
}
unsigned_integer._superclassnames = []
unsigned_integer._privpropdict = {
}
unsigned_integer._privelemdict = {
}
null._superclassnames = []
null._privpropdict = {
}
null._privelemdict = {
}
type_property_info._superclassnames = []
type_property_info._privpropdict = {
}
type_property_info._privelemdict = {
}
type_parameter_info._superclassnames = []
type_parameter_info._privpropdict = {
}
type_parameter_info._privelemdict = {
}
bounding_rectangle._superclassnames = []
bounding_rectangle._privpropdict = {
}
bounding_rectangle._privelemdict = {
}
small_integer._superclassnames = []
small_integer._privpropdict = {
}
small_integer._privelemdict = {
}
small_real._superclassnames = []
small_real._privpropdict = {
}
small_real._privelemdict = {
}
scrap_styles._superclassnames = []
scrap_styles._privpropdict = {
}
scrap_styles._privelemdict = {
}
type_suite_info._superclassnames = []
type_suite_info._privpropdict = {
}
type_suite_info._privelemdict = {
}
target_id._superclassnames = []
target_id._privpropdict = {
}
target_id._privelemdict = {
}
dash_style._superclassnames = []
dash_style._privpropdict = {
}
dash_style._privelemdict = {
}
pixel_map_record._superclassnames = []
pixel_map_record._privpropdict = {
}
pixel_map_record._privelemdict = {
}
RGB16_color._superclassnames = []
RGB16_color._privpropdict = {
}
RGB16_color._privelemdict = {
}
RGB96_color._superclassnames = []
RGB96_color._privpropdict = {
}
RGB96_color._privelemdict = {
}
rotation._superclassnames = []
rotation._privpropdict = {
}
rotation._privelemdict = {
}
version._superclassnames = []
version._privpropdict = {
}
version._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'EPS ' : PostScript_picture,
'QDpt' : point,
'TEXT' : string,
'TIFF' : TIFF_picture,
'aete' : application_dictionary,
'aeut' : system_dictionary,
'clrt' : color_table,
'cmen' : menu_item,
'cmnu' : menu,
'comp' : double_integer,
'elin' : type_element_info,
'evin' : type_event_info,
'exte' : extended_real,
'fixd' : fixed,
'fpnt' : fixed_point,
'frct' : fixed_rectangle,
'gcli' : type_class_info,
'insl' : location_reference,
'lfpt' : long_fixed_point,
'lfrc' : long_fixed_rectangle,
'lfxd' : long_fixed,
'lpnt' : long_point,
'lrct' : long_rectangle,
'mLoc' : machine_location,
'magn' : unsigned_integer,
'null' : null,
'pinf' : type_property_info,
'pmin' : type_parameter_info,
'qdrt' : bounding_rectangle,
'shor' : small_integer,
'sing' : small_real,
'styl' : scrap_styles,
'suin' : type_suite_info,
'targ' : target_id,
'tdas' : dash_style,
'tpmm' : pixel_map_record,
'tr16' : RGB16_color,
'tr96' : RGB96_color,
'trot' : rotation,
'vers' : version,
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,475 @@
"""
Package generated from /Volumes/Sap/System Folder/Extensions/AppleScript
Resource aeut resid 0 Standard Event Suites for English
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the StdSuites package is removed.", stacklevel=2)
import aetools
Error = aetools.Error
import Text_Suite
import AppleScript_Suite
import Standard_Suite
import Macintosh_Connectivity_Clas
import QuickDraw_Graphics_Suite
import QuickDraw_Graphics_Suppleme
import Required_Suite
import Table_Suite
import Type_Names_Suite
_code_to_module = {
'TEXT' : Text_Suite,
'ascr' : AppleScript_Suite,
'core' : Standard_Suite,
'macc' : Macintosh_Connectivity_Clas,
'qdrw' : QuickDraw_Graphics_Suite,
'qdsp' : QuickDraw_Graphics_Suppleme,
'reqd' : Required_Suite,
'tbls' : Table_Suite,
'tpnm' : Type_Names_Suite,
}
_code_to_fullname = {
'TEXT' : ('StdSuites.Text_Suite', 'Text_Suite'),
'ascr' : ('StdSuites.AppleScript_Suite', 'AppleScript_Suite'),
'core' : ('StdSuites.Standard_Suite', 'Standard_Suite'),
'macc' : ('StdSuites.Macintosh_Connectivity_Clas', 'Macintosh_Connectivity_Clas'),
'qdrw' : ('StdSuites.QuickDraw_Graphics_Suite', 'QuickDraw_Graphics_Suite'),
'qdsp' : ('StdSuites.QuickDraw_Graphics_Suppleme', 'QuickDraw_Graphics_Suppleme'),
'reqd' : ('StdSuites.Required_Suite', 'Required_Suite'),
'tbls' : ('StdSuites.Table_Suite', 'Table_Suite'),
'tpnm' : ('StdSuites.Type_Names_Suite', 'Type_Names_Suite'),
}
from Text_Suite import *
from AppleScript_Suite import *
from Standard_Suite import *
from Macintosh_Connectivity_Clas import *
from QuickDraw_Graphics_Suite import *
from QuickDraw_Graphics_Suppleme import *
from Required_Suite import *
from Table_Suite import *
from Type_Names_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(graphic_group)
getbaseclasses(oval)
getbaseclasses(graphic_text)
getbaseclasses(graphic_shape)
getbaseclasses(drawing_area)
getbaseclasses(graphic_line)
getbaseclasses(polygon)
getbaseclasses(pixel)
getbaseclasses(rounded_rectangle)
getbaseclasses(graphic_object)
getbaseclasses(arc)
getbaseclasses(pixel_map)
getbaseclasses(rectangle)
getbaseclasses(selection_2d_object)
getbaseclasses(application)
getbaseclasses(document)
getbaseclasses(window)
getbaseclasses(file)
getbaseclasses(alias)
getbaseclasses(insertion_point)
getbaseclasses(character)
getbaseclasses(paragraph)
getbaseclasses(word)
getbaseclasses(text_flow)
getbaseclasses(text_style_info)
getbaseclasses(line)
getbaseclasses(text)
getbaseclasses(AppleTalk_address)
getbaseclasses(address_specification)
getbaseclasses(Token_Ring_address)
getbaseclasses(FireWire_address)
getbaseclasses(bus_slot)
getbaseclasses(SCSI_address)
getbaseclasses(ADB_address)
getbaseclasses(USB_address)
getbaseclasses(device_specification)
getbaseclasses(LocalTalk_address)
getbaseclasses(IP_address)
getbaseclasses(Ethernet_address)
getbaseclasses(graphic_group)
getbaseclasses(drawing_area)
getbaseclasses(cell)
getbaseclasses(column)
getbaseclasses(table)
getbaseclasses(row)
getbaseclasses(small_integer)
getbaseclasses(system_dictionary)
getbaseclasses(color_table)
getbaseclasses(fixed_point)
getbaseclasses(plain_text)
getbaseclasses(type_element_info)
getbaseclasses(machine_location)
getbaseclasses(PostScript_picture)
getbaseclasses(type_suite_info)
getbaseclasses(menu_item)
getbaseclasses(pixel_map_record)
getbaseclasses(small_real)
getbaseclasses(null)
getbaseclasses(rotation)
getbaseclasses(fixed)
getbaseclasses(long_point)
getbaseclasses(target_id)
getbaseclasses(type_property_info)
getbaseclasses(type_parameter_info)
getbaseclasses(long_fixed_point)
getbaseclasses(bounding_rectangle)
getbaseclasses(TIFF_picture)
getbaseclasses(long_fixed)
getbaseclasses(location_reference)
getbaseclasses(version)
getbaseclasses(RGB16_color)
getbaseclasses(double_integer)
getbaseclasses(type_event_info)
getbaseclasses(point)
getbaseclasses(application_dictionary)
getbaseclasses(unsigned_integer)
getbaseclasses(menu)
getbaseclasses(fixed_rectangle)
getbaseclasses(long_fixed_rectangle)
getbaseclasses(type_class_info)
getbaseclasses(RGB96_color)
getbaseclasses(dash_style)
getbaseclasses(scrap_styles)
getbaseclasses(extended_real)
getbaseclasses(long_rectangle)
getbaseclasses(May)
getbaseclasses(string)
getbaseclasses(miles)
getbaseclasses(number_or_date)
getbaseclasses(October)
getbaseclasses(event)
getbaseclasses(Pascal_string)
getbaseclasses(zone)
getbaseclasses(picture)
getbaseclasses(list_or_string)
getbaseclasses(number)
getbaseclasses(Tuesday)
getbaseclasses(version)
getbaseclasses(December)
getbaseclasses(square_kilometres)
getbaseclasses(reference)
getbaseclasses(vector)
getbaseclasses(weekday)
getbaseclasses(Sunday)
getbaseclasses(international_text)
getbaseclasses(seconds)
getbaseclasses(RGB_color)
getbaseclasses(kilometres)
getbaseclasses(styled_Unicode_text)
getbaseclasses(missing_value)
getbaseclasses(metres)
getbaseclasses(number_or_string)
getbaseclasses(list)
getbaseclasses(linked_list)
getbaseclasses(real)
getbaseclasses(encoded_string)
getbaseclasses(list_or_record)
getbaseclasses(Monday)
getbaseclasses(September)
getbaseclasses(anything)
getbaseclasses(property)
getbaseclasses(reference_form)
getbaseclasses(item)
getbaseclasses(grams)
getbaseclasses(record)
getbaseclasses(empty_ae_name_)
getbaseclasses(constant)
getbaseclasses(square_miles)
getbaseclasses(data)
getbaseclasses(Unicode_text)
getbaseclasses(yards)
getbaseclasses(cubic_yards)
getbaseclasses(pounds)
getbaseclasses(cubic_centimetres)
getbaseclasses(text)
getbaseclasses(July)
getbaseclasses(cubic_metres)
getbaseclasses(styled_text)
getbaseclasses(number_2c__date_or_text)
getbaseclasses(feet)
getbaseclasses(February)
getbaseclasses(degrees_Celsius)
getbaseclasses(keystroke)
getbaseclasses(integer)
getbaseclasses(degrees_Fahrenheit)
getbaseclasses(list_2c__record_or_text)
getbaseclasses(date)
getbaseclasses(degrees_Kelvin)
getbaseclasses(centimetres)
getbaseclasses(writing_code)
getbaseclasses(alias_or_string)
getbaseclasses(writing_code_info)
getbaseclasses(text_item)
getbaseclasses(machine)
getbaseclasses(type_class)
getbaseclasses(preposition)
getbaseclasses(Wednesday)
getbaseclasses(upper_case)
getbaseclasses(March)
getbaseclasses(square_feet)
getbaseclasses(November)
getbaseclasses(quarts)
getbaseclasses(alias)
getbaseclasses(January)
getbaseclasses(month)
getbaseclasses(June)
getbaseclasses(August)
getbaseclasses(styled_Clipboard_text)
getbaseclasses(gallons)
getbaseclasses(cubic_inches)
getbaseclasses(Friday)
getbaseclasses(sound)
getbaseclasses(class_)
getbaseclasses(kilograms)
getbaseclasses(script)
getbaseclasses(litres)
getbaseclasses(boolean)
getbaseclasses(square_metres)
getbaseclasses(inches)
getbaseclasses(character)
getbaseclasses(April)
getbaseclasses(ounces)
getbaseclasses(app)
getbaseclasses(handler)
getbaseclasses(C_string)
getbaseclasses(Thursday)
getbaseclasses(square_yards)
getbaseclasses(cubic_feet)
getbaseclasses(Saturday)
getbaseclasses(file_specification)
#
# Indices of types declared in this module
#
_classdeclarations = {
'cpic' : graphic_group,
'covl' : oval,
'cgtx' : graphic_text,
'cgsh' : graphic_shape,
'cdrw' : drawing_area,
'glin' : graphic_line,
'cpgn' : polygon,
'cpxl' : pixel,
'crrc' : rounded_rectangle,
'cgob' : graphic_object,
'carc' : arc,
'cpix' : pixel_map,
'crec' : rectangle,
'csel' : selection_2d_object,
'capp' : application,
'docu' : document,
'cwin' : window,
'file' : file,
'alis' : alias,
'cins' : insertion_point,
'cha ' : character,
'cpar' : paragraph,
'cwor' : word,
'cflo' : text_flow,
'tsty' : text_style_info,
'clin' : line,
'ctxt' : text,
'cat ' : AppleTalk_address,
'cadr' : address_specification,
'ctok' : Token_Ring_address,
'cfw ' : FireWire_address,
'cbus' : bus_slot,
'cscs' : SCSI_address,
'cadb' : ADB_address,
'cusb' : USB_address,
'cdev' : device_specification,
'clt ' : LocalTalk_address,
'cip ' : IP_address,
'cen ' : Ethernet_address,
'cpic' : graphic_group,
'cdrw' : drawing_area,
'ccel' : cell,
'ccol' : column,
'ctbl' : table,
'crow' : row,
'shor' : small_integer,
'aeut' : system_dictionary,
'clrt' : color_table,
'fpnt' : fixed_point,
'TEXT' : plain_text,
'elin' : type_element_info,
'mLoc' : machine_location,
'EPS ' : PostScript_picture,
'suin' : type_suite_info,
'cmen' : menu_item,
'tpmm' : pixel_map_record,
'sing' : small_real,
'null' : null,
'trot' : rotation,
'fixd' : fixed,
'lpnt' : long_point,
'targ' : target_id,
'pinf' : type_property_info,
'pmin' : type_parameter_info,
'lfpt' : long_fixed_point,
'qdrt' : bounding_rectangle,
'TIFF' : TIFF_picture,
'lfxd' : long_fixed,
'insl' : location_reference,
'vers' : version,
'tr16' : RGB16_color,
'comp' : double_integer,
'evin' : type_event_info,
'QDpt' : point,
'aete' : application_dictionary,
'magn' : unsigned_integer,
'cmnu' : menu,
'frct' : fixed_rectangle,
'lfrc' : long_fixed_rectangle,
'gcli' : type_class_info,
'tr96' : RGB96_color,
'tdas' : dash_style,
'styl' : scrap_styles,
'exte' : extended_real,
'lrct' : long_rectangle,
'may ' : May,
'TEXT' : string,
'mile' : miles,
'nd ' : number_or_date,
'oct ' : October,
'evnt' : event,
'pstr' : Pascal_string,
'zone' : zone,
'PICT' : picture,
'ls ' : list_or_string,
'nmbr' : number,
'tue ' : Tuesday,
'vers' : version,
'dec ' : December,
'sqkm' : square_kilometres,
'obj ' : reference,
'vect' : vector,
'wkdy' : weekday,
'sun ' : Sunday,
'itxt' : international_text,
'scnd' : seconds,
'cRGB' : RGB_color,
'kmtr' : kilometres,
'sutx' : styled_Unicode_text,
'msng' : missing_value,
'metr' : metres,
'ns ' : number_or_string,
'list' : list,
'llst' : linked_list,
'doub' : real,
'encs' : encoded_string,
'lr ' : list_or_record,
'mon ' : Monday,
'sep ' : September,
'****' : anything,
'prop' : property,
'kfrm' : reference_form,
'cobj' : item,
'gram' : grams,
'reco' : record,
'undf' : empty_ae_name_,
'enum' : constant,
'sqmi' : square_miles,
'rdat' : data,
'utxt' : Unicode_text,
'yard' : yards,
'cyrd' : cubic_yards,
'lbs ' : pounds,
'ccmt' : cubic_centimetres,
'ctxt' : text,
'jul ' : July,
'cmet' : cubic_metres,
'STXT' : styled_text,
'nds ' : number_2c__date_or_text,
'feet' : feet,
'feb ' : February,
'degc' : degrees_Celsius,
'kprs' : keystroke,
'long' : integer,
'degf' : degrees_Fahrenheit,
'lrs ' : list_2c__record_or_text,
'ldt ' : date,
'degk' : degrees_Kelvin,
'cmtr' : centimetres,
'psct' : writing_code,
'sf ' : alias_or_string,
'citl' : writing_code_info,
'citm' : text_item,
'mach' : machine,
'type' : type_class,
'prep' : preposition,
'wed ' : Wednesday,
'case' : upper_case,
'mar ' : March,
'sqft' : square_feet,
'nov ' : November,
'qrts' : quarts,
'alis' : alias,
'jan ' : January,
'mnth' : month,
'jun ' : June,
'aug ' : August,
'styl' : styled_Clipboard_text,
'galn' : gallons,
'cuin' : cubic_inches,
'fri ' : Friday,
'snd ' : sound,
'pcls' : class_,
'kgrm' : kilograms,
'scpt' : script,
'litr' : litres,
'bool' : boolean,
'sqrm' : square_metres,
'inch' : inches,
'cha ' : character,
'apr ' : April,
'ozs ' : ounces,
'capp' : app,
'hand' : handler,
'cstr' : C_string,
'thu ' : Thursday,
'sqyd' : square_yards,
'cfet' : cubic_feet,
'sat ' : Saturday,
'fss ' : file_specification,
}
class StdSuites(Text_Suite_Events,
AppleScript_Suite_Events,
Standard_Suite_Events,
Macintosh_Connectivity_Clas_Events,
QuickDraw_Graphics_Suite_Events,
QuickDraw_Graphics_Suppleme_Events,
Required_Suite_Events,
Table_Suite_Events,
Type_Names_Suite_Events,
aetools.TalkTo):
_signature = 'ascr'
_moduleName = 'StdSuites'

View File

@@ -0,0 +1,381 @@
"""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,
}

View File

@@ -0,0 +1,287 @@
"""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,
}

View File

@@ -0,0 +1,50 @@
"""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 = {
}

View File

@@ -0,0 +1,74 @@
"""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 = {
}

View File

@@ -0,0 +1,149 @@
"""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 = {
}

View File

@@ -0,0 +1,214 @@
"""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 a 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 = {
}

View File

@@ -0,0 +1,582 @@
"""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 is not 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,
}

View File

@@ -0,0 +1,109 @@
"""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 = {
}

View File

@@ -0,0 +1,195 @@
"""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 = {
}

View File

@@ -0,0 +1,144 @@
"""
Package generated from /System/Library/CoreServices/System Events.app
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the SystemEvents package is removed.", stacklevel=2)
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

View File

@@ -0,0 +1,582 @@
"""Suite Standard Suite: Common classes and commands for most applications.
Level 1, version 1
Generated from /Applications/Utilities/Terminal.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 is not 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,
}

View File

@@ -0,0 +1,254 @@
"""Suite Terminal Suite: Terms and Events for controlling the Terminal application
Level 1, version 1
Generated from /Applications/Utilities/Terminal.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'trmx'
class Terminal_Suite_Events:
def GetURL(self, _object, _attributes={}, **_arguments):
"""GetURL: Opens a telnet: URL
Required argument: the object for the command
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'GURL'
_subcode = 'GURL'
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_script = {
'in_' : 'kfil',
'with_command' : 'cmnd',
}
def do_script(self, _object, _attributes={}, **_arguments):
"""do script: Run a UNIX shell script or command
Required argument: the object for the command
Keyword argument in_: the window in which to execute the command
Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter
Keyword argument _attributes: AppleEvent attribute dictionary
Returns: the reply for the command
"""
_code = 'core'
_subcode = 'dosc'
aetools.keysubst(_arguments, self._argmap_do_script)
_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 Terminal 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_properties(aetools.NProperty):
"""properties - every property of the Terminal program """
which = 'pALL'
want = '****'
properties = _Prop_properties()
# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
# element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
applications = application
class window(aetools.ComponentItem):
"""window - A Terminal window """
want = 'cwin'
class _Prop_background_color(aetools.NProperty):
"""background color - the background color for the window """
which = 'pbcl'
want = '****'
class _Prop_bold_text_color(aetools.NProperty):
"""bold text color - the bold text color for the window """
which = 'pbtc'
want = '****'
class _Prop_bounds(aetools.NProperty):
"""bounds - the boundary rectangle for the window, relative to the upper left corner of the screen """
which = 'pbnd'
want = '****'
class _Prop_busy(aetools.NProperty):
"""busy - Is the window busy running a process? """
which = 'busy'
want = 'bool'
class _Prop_contents(aetools.NProperty):
"""contents - the currently visible contents of the window """
which = 'pcnt'
want = 'utxt'
class _Prop_cursor_color(aetools.NProperty):
"""cursor color - the cursor color for the window """
which = 'pcuc'
want = '****'
class _Prop_custom_title(aetools.NProperty):
"""custom title - the custom title for the window """
which = 'titl'
want = 'utxt'
class _Prop_frame(aetools.NProperty):
"""frame - the origin and size of the window """
which = 'pfra'
want = '****'
class _Prop_frontmost(aetools.NProperty):
"""frontmost - Is the window in front of the other Terminal windows? """
which = 'pisf'
want = 'bool'
class _Prop_history(aetools.NProperty):
"""history - the contents of the entire scrolling buffer of the window """
which = 'hist'
want = 'utxt'
class _Prop_normal_text_color(aetools.NProperty):
"""normal text color - the normal text color for the window """
which = 'ptxc'
want = '****'
class _Prop_number_of_columns(aetools.NProperty):
"""number of columns - the number of columns in the window """
which = 'ccol'
want = 'long'
class _Prop_number_of_rows(aetools.NProperty):
"""number of rows - the number of rows in the window """
which = 'crow'
want = 'long'
class _Prop_origin(aetools.NProperty):
"""origin - the lower left coordinates of the window, relative to the lower left corner of the screen """
which = 'pori'
want = '****'
class _Prop_position(aetools.NProperty):
"""position - the upper left coordinates of the window, relative to the upper left corner of the screen """
which = 'ppos'
want = '****'
class _Prop_processes(aetools.NProperty):
"""processes - a list of the currently running processes """
which = 'prcs'
want = 'utxt'
class _Prop_size(aetools.NProperty):
"""size - the width and height of the window """
which = 'psiz'
want = '****'
class _Prop_title_displays_custom_title(aetools.NProperty):
"""title displays custom title - Does the title for the window contain a custom title? """
which = 'tdct'
want = 'bool'
class _Prop_title_displays_device_name(aetools.NProperty):
"""title displays device name - Does the title for the window contain the device name? """
which = 'tddn'
want = 'bool'
class _Prop_title_displays_file_name(aetools.NProperty):
"""title displays file name - Does the title for the window contain the file name? """
which = 'tdfn'
want = 'bool'
class _Prop_title_displays_shell_path(aetools.NProperty):
"""title displays shell path - Does the title for the window contain the shell path? """
which = 'tdsp'
want = 'bool'
class _Prop_title_displays_window_size(aetools.NProperty):
"""title displays window size - Does the title for the window contain the window size? """
which = 'tdws'
want = 'bool'
windows = window
application._superclassnames = []
import Standard_Suite
application._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'properties' : _Prop_properties,
}
application._privelemdict = {
'document' : Standard_Suite.document,
'window' : window,
}
window._superclassnames = []
window._privpropdict = {
'_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
'background_color' : _Prop_background_color,
'bold_text_color' : _Prop_bold_text_color,
'bounds' : _Prop_bounds,
'busy' : _Prop_busy,
'contents' : _Prop_contents,
'cursor_color' : _Prop_cursor_color,
'custom_title' : _Prop_custom_title,
'frame' : _Prop_frame,
'frontmost' : _Prop_frontmost,
'history' : _Prop_history,
'normal_text_color' : _Prop_normal_text_color,
'number_of_columns' : _Prop_number_of_columns,
'number_of_rows' : _Prop_number_of_rows,
'origin' : _Prop_origin,
'position' : _Prop_position,
'processes' : _Prop_processes,
'properties' : _Prop_properties,
'size' : _Prop_size,
'title_displays_custom_title' : _Prop_title_displays_custom_title,
'title_displays_device_name' : _Prop_title_displays_device_name,
'title_displays_file_name' : _Prop_title_displays_file_name,
'title_displays_shell_path' : _Prop_title_displays_shell_path,
'title_displays_window_size' : _Prop_title_displays_window_size,
}
window._privelemdict = {
}
#
# Indices of types declared in this module
#
_classdeclarations = {
'capp' : application,
'cwin' : window,
}
_propdeclarations = {
'busy' : _Prop_busy,
'c@#^' : _Prop__3c_Inheritance_3e_,
'ccol' : _Prop_number_of_columns,
'crow' : _Prop_number_of_rows,
'hist' : _Prop_history,
'pALL' : _Prop_properties,
'pbcl' : _Prop_background_color,
'pbnd' : _Prop_bounds,
'pbtc' : _Prop_bold_text_color,
'pcnt' : _Prop_contents,
'pcuc' : _Prop_cursor_color,
'pfra' : _Prop_frame,
'pisf' : _Prop_frontmost,
'pori' : _Prop_origin,
'ppos' : _Prop_position,
'prcs' : _Prop_processes,
'psiz' : _Prop_size,
'ptxc' : _Prop_normal_text_color,
'tdct' : _Prop_title_displays_custom_title,
'tddn' : _Prop_title_displays_device_name,
'tdfn' : _Prop_title_displays_file_name,
'tdsp' : _Prop_title_displays_shell_path,
'tdws' : _Prop_title_displays_window_size,
'titl' : _Prop_custom_title,
}
_compdeclarations = {
}
_enumdeclarations = {
}

View File

@@ -0,0 +1,195 @@
"""Suite Text Suite: A set of basic classes for text processing.
Level 1, version 1
Generated from /Applications/Utilities/Terminal.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 = {
}

View File

@@ -0,0 +1,93 @@
"""
Package generated from /Applications/Utilities/Terminal.app
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the Terminal module is removed.", stacklevel=2)
import aetools
Error = aetools.Error
import Standard_Suite
import Text_Suite
import Terminal_Suite
_code_to_module = {
'????' : Standard_Suite,
'????' : Text_Suite,
'trmx' : Terminal_Suite,
}
_code_to_fullname = {
'????' : ('Terminal.Standard_Suite', 'Standard_Suite'),
'????' : ('Terminal.Text_Suite', 'Text_Suite'),
'trmx' : ('Terminal.Terminal_Suite', 'Terminal_Suite'),
}
from Standard_Suite import *
from Text_Suite import *
from Terminal_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(color)
getbaseclasses(window)
getbaseclasses(application)
getbaseclasses(item)
getbaseclasses(document)
getbaseclasses(window)
getbaseclasses(application)
getbaseclasses(character)
getbaseclasses(attachment)
getbaseclasses(paragraph)
getbaseclasses(word)
getbaseclasses(attribute_run)
getbaseclasses(text)
#
# Indices of types declared in this module
#
_classdeclarations = {
'colr' : color,
'cwin' : window,
'capp' : application,
'cobj' : item,
'docu' : document,
'cwin' : window,
'capp' : application,
'cha ' : character,
'atts' : attachment,
'cpar' : paragraph,
'cwor' : word,
'catr' : attribute_run,
'ctxt' : text,
}
class Terminal(Standard_Suite_Events,
Text_Suite_Events,
Terminal_Suite_Events,
aetools.TalkTo):
_signature = 'trmx'
_moduleName = 'Terminal'
_elemdict = application._elemdict
_propdict = application._propdict

View File

@@ -0,0 +1,31 @@
"""
Manually generated suite used as base class for StdSuites Required and Standard
suites. This is needed because the events and enums in this suite belong
in the Required suite according to the Apple docs, but they often seem to be
in the Standard suite.
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the _builtinSuites module is removed.", stacklevel=2)
import aetools
import builtin_Suite
_code_to_module = {
'reqd' : builtin_Suite,
'core' : builtin_Suite,
}
_code_to_fullname = {
'reqd' : ('_builtinSuites.builtin_Suite', 'builtin_Suite'),
'core' : ('_builtinSuites.builtin_Suite', 'builtin_Suite'),
}
from builtin_Suite import *
class _builtinSuites(builtin_Suite_Events,
aetools.TalkTo):
_signature = 'ascr'

View File

@@ -0,0 +1,140 @@
"""Suite builtin_Suite: Every application supports open, reopen, print, run, and quit
Level 1, version 1
"""
import aetools
import MacOS
_code = 'aevt'
class builtin_Suite_Events:
def open(self, _object, _attributes={}, **_arguments):
"""open: Open the specified object(s)
Required argument: list of objects to open
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 run(self, _no_object=None, _attributes={}, **_arguments):
"""run: Run an application. Most applications will open an empty, untitled window.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'oapp'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def reopen(self, _no_object=None, _attributes={}, **_arguments):
"""reopen: Reactivate a running application. Some applications will open a new untitled window if no window is open.
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'rapp'
if _arguments: raise TypeError, 'No optional args expected'
if _no_object is not 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['----']
def _print(self, _object, _attributes={}, **_arguments):
"""print: Print the specified object(s)
Required argument: list of objects to print
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, _no_object=None, _attributes={}, **_arguments):
"""quit: Quit an application
Keyword argument saving: specifies whether to save currently open documents
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code = 'aevt'
_subcode = 'quit'
aetools.keysubst(_arguments, self._argmap_quit)
if _no_object is not None: raise TypeError, 'No direct arg expected'
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_close = {
'saving' : 'savo',
'saving_in' : 'kfil',
}
_Enum_savo = {
'yes' : 'yes ', # Save objects now
'no' : 'no ', # Do not save objects
'ask' : 'ask ', # Ask the user whether to save
}
#
# Indices of types declared in this module
#
_classdeclarations = {
}
_propdeclarations = {
}
_compdeclarations = {
}
_enumdeclarations = {
'savo' : _Enum_savo,
}