Esempio n. 1
0
    def create(self, _object, _attributes={}, **_arguments):
        """create: Create a new Disk Copy document
        Required argument: the name of the volume to create
        Keyword argument saving_as: the disk image to be created
        Keyword argument logical_blocks: the number of logical blocks
        Keyword argument zeroing: Should all blocks on the disk be set to zero?
        Keyword argument leave_image_mounted: Should the image be mounted after it is created?
        Keyword argument filesystem: file system to use (Mac OS Standard/compatible, Mac OS Enhanced)
        Keyword argument _attributes: AppleEvent attribute dictionary
        Returns: a reference to newly created disk image (or newly mounted disk)
        """
        _code = 'ddsk'
        _subcode = 'Crea'

        aetools.keysubst(_arguments, self._argmap_create)
        _arguments['----'] = _object

        aetools.enumsubst(_arguments, 'SvAs', _Enum_fss_)
        aetools.enumsubst(_arguments, 'Blks', _Enum_long)
        aetools.enumsubst(_arguments, 'Zero', _Enum_bool)
        aetools.enumsubst(_arguments, 'Moun', _Enum_bool)
        aetools.enumsubst(_arguments, 'Fsys', _Enum_Fsys)

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                        _arguments, _attributes)
        if _arguments.has_key('errn'):
            raise aetools.Error, aetools.decodeerror(_arguments)
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Esempio n. 2
0
    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['----']
Esempio n. 3
0
    def mount(self, _object, _attributes={}, **_arguments):
        """mount: Mounts an Disk Copy image as a disk volume
        Required argument: a reference to the disk image to be mounted
        Keyword argument access_mode: the access mode for mounted volume (default is "any", i.e. best possible)
        Keyword argument checksum_verification: Verify the checksum before mounting?
        Keyword argument signature_verification: Verify the DigiSignŽ signature before mounting?
        Keyword argument RAM_caching: Cache the disk image in RAM? (if omitted, don't cache)
        Keyword argument _attributes: AppleEvent attribute dictionary
        Returns: a reference to mounted disk
        """
        _code = 'ddsk'
        _subcode = 'Moun'

        aetools.keysubst(_arguments, self._argmap_mount)
        _arguments['----'] = _object

        aetools.enumsubst(_arguments, 'Acss', _Enum_Acss)
        aetools.enumsubst(_arguments, 'VChk', _Enum_bool)
        aetools.enumsubst(_arguments, 'VSig', _Enum_bool)
        aetools.enumsubst(_arguments, 'Cach', _Enum_bool)

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                        _arguments, _attributes)
        if _arguments.has_key('errn'):
            raise aetools.Error, aetools.decodeerror(_arguments)
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Esempio n. 4
0
    def create_a_floppy_from(self, _object, _attributes={}, **_arguments):
        """create a floppy from: create a floppy disk from a Disk Copy document
        Required argument: the disk image to make a floppy from
        Keyword argument signature_verification: Should the DigiSignŽ signature be verified before creating a floppy disk?
        Keyword argument erase_confirmation: Should the user be asked to confirm the erasure of the previous contents of floppy disks?
        Keyword argument make_multiple_floppies: Should the user be prompted to create multiple floppy disks?
        Keyword argument _attributes: AppleEvent attribute dictionary
        """
        _code = 'ddsk'
        _subcode = 'Bfpy'

        aetools.keysubst(_arguments, self._argmap_create_a_floppy_from)
        _arguments['----'] = _object

        aetools.enumsubst(_arguments, 'VSig', _Enum_bool)
        aetools.enumsubst(_arguments, 'Cfrm', _Enum_bool)
        aetools.enumsubst(_arguments, 'Mult', _Enum_bool)

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                        _arguments, _attributes)
        if _arguments.has_key('errn'):
            raise aetools.Error, aetools.decodeerror(_arguments)
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Esempio n. 5
0
    def create_SMI(self, _object, _attributes={}, **_arguments):
        """create SMI: Creates a self-mounting image (SMI) from a list of NDIF disk images
        Required argument: the self-mounting image to create
        Keyword argument source_images: a list of references to sources images
        Keyword argument launching_application: the path to an application to launch
        Keyword argument launching_document: the path to a document to open
        Keyword argument version_string: sets the 'vers' 1 resource of the self-mounting image
        Keyword argument checksum_verification: Should the checksum of the source images be verified before creating the SMI?
        Keyword argument signature_verification: Should the DigiSignŽ signature of the source images be verified before creating the SMI?
        Keyword argument image_signing: Should the SMI be given a digital signature when it is created?
        Keyword argument _attributes: AppleEvent attribute dictionary
        Returns: a reference to the self-mounting image created
        """
        _code = 'ddsk'
        _subcode = 'MSMI'

        aetools.keysubst(_arguments, self._argmap_create_SMI)
        _arguments['----'] = _object

        aetools.enumsubst(_arguments, 'VChk', _Enum_bool)
        aetools.enumsubst(_arguments, 'VSig', _Enum_bool)
        aetools.enumsubst(_arguments, 'SImg', _Enum_bool)

        _reply, _arguments, _attributes = self.send(_code, _subcode,
                        _arguments, _attributes)
        if _arguments.has_key('errn'):
            raise aetools.Error, aetools.decodeerror(_arguments)
        # XXXX Optionally decode result
        if _arguments.has_key('----'):
            return _arguments['----']
Esempio n. 6
0
    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['----']
Esempio n. 7
0
    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["----"]
Esempio n. 8
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 9
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 10
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 11
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 12
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 13
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 14
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 17
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 19
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 20
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 21
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 27
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 28
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 29
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 31
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 33
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 35
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 36
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 37
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 38
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 40
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 41
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 42
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 43
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 44
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 45
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 46
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 47
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 48
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 49
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 50
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 51
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 52
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 53
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 54
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 56
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 57
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 59
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']
Esempio n. 60
0
 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)
     if _arguments.has_key('----'):
         return _arguments['----']