| 1 | n/a | """Suite Standard Suite: Common terms that most applications should support |
|---|
| 2 | n/a | Level 1, version 1 |
|---|
| 3 | n/a | |
|---|
| 4 | n/a | Generated from /System/Library/CoreServices/Finder.app |
|---|
| 5 | n/a | AETE/AEUT resource version 0/144, language 0, script 0 |
|---|
| 6 | n/a | """ |
|---|
| 7 | n/a | |
|---|
| 8 | n/a | import aetools |
|---|
| 9 | n/a | import MacOS |
|---|
| 10 | n/a | |
|---|
| 11 | n/a | _code = 'CoRe' |
|---|
| 12 | n/a | |
|---|
| 13 | n/a | from StdSuites.Standard_Suite import * |
|---|
| 14 | n/a | class Standard_Suite_Events(Standard_Suite_Events): |
|---|
| 15 | n/a | |
|---|
| 16 | n/a | def close(self, _object, _attributes={}, **_arguments): |
|---|
| 17 | n/a | """close: Close an object |
|---|
| 18 | n/a | Required argument: the object to close |
|---|
| 19 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 20 | n/a | """ |
|---|
| 21 | n/a | _code = 'core' |
|---|
| 22 | n/a | _subcode = 'clos' |
|---|
| 23 | n/a | |
|---|
| 24 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 25 | n/a | _arguments['----'] = _object |
|---|
| 26 | n/a | |
|---|
| 27 | n/a | |
|---|
| 28 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 29 | n/a | _arguments, _attributes) |
|---|
| 30 | n/a | if _arguments.get('errn', 0): |
|---|
| 31 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 32 | n/a | # XXXX Optionally decode result |
|---|
| 33 | n/a | if _arguments.has_key('----'): |
|---|
| 34 | n/a | return _arguments['----'] |
|---|
| 35 | n/a | |
|---|
| 36 | n/a | _argmap_count = { |
|---|
| 37 | n/a | 'each' : 'kocl', |
|---|
| 38 | n/a | } |
|---|
| 39 | n/a | |
|---|
| 40 | n/a | def count(self, _object, _attributes={}, **_arguments): |
|---|
| 41 | n/a | """count: Return the number of elements of a particular class within an object |
|---|
| 42 | n/a | Required argument: the object whose elements are to be counted |
|---|
| 43 | n/a | Keyword argument each: the class of the elements to be counted |
|---|
| 44 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 45 | n/a | Returns: the number of elements |
|---|
| 46 | n/a | """ |
|---|
| 47 | n/a | _code = 'core' |
|---|
| 48 | n/a | _subcode = 'cnte' |
|---|
| 49 | n/a | |
|---|
| 50 | n/a | aetools.keysubst(_arguments, self._argmap_count) |
|---|
| 51 | n/a | _arguments['----'] = _object |
|---|
| 52 | n/a | |
|---|
| 53 | n/a | |
|---|
| 54 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 55 | n/a | _arguments, _attributes) |
|---|
| 56 | n/a | if _arguments.get('errn', 0): |
|---|
| 57 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 58 | n/a | # XXXX Optionally decode result |
|---|
| 59 | n/a | if _arguments.has_key('----'): |
|---|
| 60 | n/a | return _arguments['----'] |
|---|
| 61 | n/a | |
|---|
| 62 | n/a | _argmap_data_size = { |
|---|
| 63 | n/a | 'as' : 'rtyp', |
|---|
| 64 | n/a | } |
|---|
| 65 | n/a | |
|---|
| 66 | n/a | def data_size(self, _object, _attributes={}, **_arguments): |
|---|
| 67 | n/a | """data size: Return the size in bytes of an object |
|---|
| 68 | n/a | Required argument: the object whose data size is to be returned |
|---|
| 69 | n/a | Keyword argument as: the data type for which the size is calculated |
|---|
| 70 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 71 | n/a | Returns: the size of the object in bytes |
|---|
| 72 | n/a | """ |
|---|
| 73 | n/a | _code = 'core' |
|---|
| 74 | n/a | _subcode = 'dsiz' |
|---|
| 75 | n/a | |
|---|
| 76 | n/a | aetools.keysubst(_arguments, self._argmap_data_size) |
|---|
| 77 | n/a | _arguments['----'] = _object |
|---|
| 78 | n/a | |
|---|
| 79 | n/a | |
|---|
| 80 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 81 | n/a | _arguments, _attributes) |
|---|
| 82 | n/a | if _arguments.get('errn', 0): |
|---|
| 83 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 84 | n/a | # XXXX Optionally decode result |
|---|
| 85 | n/a | if _arguments.has_key('----'): |
|---|
| 86 | n/a | return _arguments['----'] |
|---|
| 87 | n/a | |
|---|
| 88 | n/a | def delete(self, _object, _attributes={}, **_arguments): |
|---|
| 89 | n/a | """delete: Move an item from its container to the trash |
|---|
| 90 | n/a | Required argument: the item to delete |
|---|
| 91 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 92 | n/a | Returns: to the item that was just deleted |
|---|
| 93 | n/a | """ |
|---|
| 94 | n/a | _code = 'core' |
|---|
| 95 | n/a | _subcode = 'delo' |
|---|
| 96 | n/a | |
|---|
| 97 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 98 | n/a | _arguments['----'] = _object |
|---|
| 99 | n/a | |
|---|
| 100 | n/a | |
|---|
| 101 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 102 | n/a | _arguments, _attributes) |
|---|
| 103 | n/a | if _arguments.get('errn', 0): |
|---|
| 104 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 105 | n/a | # XXXX Optionally decode result |
|---|
| 106 | n/a | if _arguments.has_key('----'): |
|---|
| 107 | n/a | return _arguments['----'] |
|---|
| 108 | n/a | |
|---|
| 109 | n/a | _argmap_duplicate = { |
|---|
| 110 | n/a | 'to' : 'insh', |
|---|
| 111 | n/a | 'replacing' : 'alrp', |
|---|
| 112 | n/a | 'routing_suppressed' : 'rout', |
|---|
| 113 | n/a | } |
|---|
| 114 | n/a | |
|---|
| 115 | n/a | def duplicate(self, _object, _attributes={}, **_arguments): |
|---|
| 116 | n/a | """duplicate: Duplicate one or more object(s) |
|---|
| 117 | n/a | Required argument: the object(s) to duplicate |
|---|
| 118 | n/a | Keyword argument to: the new location for the object(s) |
|---|
| 119 | n/a | Keyword argument replacing: Specifies whether or not to replace items in the destination that have the same name as items being duplicated |
|---|
| 120 | n/a | Keyword argument routing_suppressed: Specifies whether or not to autoroute items (default is false). Only applies when copying to the system folder. |
|---|
| 121 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 122 | n/a | Returns: to the duplicated object(s) |
|---|
| 123 | n/a | """ |
|---|
| 124 | n/a | _code = 'core' |
|---|
| 125 | n/a | _subcode = 'clon' |
|---|
| 126 | n/a | |
|---|
| 127 | n/a | aetools.keysubst(_arguments, self._argmap_duplicate) |
|---|
| 128 | n/a | _arguments['----'] = _object |
|---|
| 129 | n/a | |
|---|
| 130 | n/a | aetools.enumsubst(_arguments, 'alrp', _Enum_bool) |
|---|
| 131 | n/a | aetools.enumsubst(_arguments, 'rout', _Enum_bool) |
|---|
| 132 | n/a | |
|---|
| 133 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 134 | n/a | _arguments, _attributes) |
|---|
| 135 | n/a | if _arguments.get('errn', 0): |
|---|
| 136 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 137 | n/a | # XXXX Optionally decode result |
|---|
| 138 | n/a | if _arguments.has_key('----'): |
|---|
| 139 | n/a | return _arguments['----'] |
|---|
| 140 | n/a | |
|---|
| 141 | n/a | def exists(self, _object, _attributes={}, **_arguments): |
|---|
| 142 | n/a | """exists: Verify if an object exists |
|---|
| 143 | n/a | Required argument: the object in question |
|---|
| 144 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 145 | n/a | Returns: true if it exists, false if not |
|---|
| 146 | n/a | """ |
|---|
| 147 | n/a | _code = 'core' |
|---|
| 148 | n/a | _subcode = 'doex' |
|---|
| 149 | n/a | |
|---|
| 150 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 151 | n/a | _arguments['----'] = _object |
|---|
| 152 | n/a | |
|---|
| 153 | n/a | |
|---|
| 154 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 155 | n/a | _arguments, _attributes) |
|---|
| 156 | n/a | if _arguments.get('errn', 0): |
|---|
| 157 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 158 | n/a | # XXXX Optionally decode result |
|---|
| 159 | n/a | if _arguments.has_key('----'): |
|---|
| 160 | n/a | return _arguments['----'] |
|---|
| 161 | n/a | |
|---|
| 162 | n/a | _argmap_make = { |
|---|
| 163 | n/a | 'new' : 'kocl', |
|---|
| 164 | n/a | 'at' : 'insh', |
|---|
| 165 | n/a | 'to' : 'to ', |
|---|
| 166 | n/a | 'with_properties' : 'prdt', |
|---|
| 167 | n/a | } |
|---|
| 168 | n/a | |
|---|
| 169 | n/a | def make(self, _no_object=None, _attributes={}, **_arguments): |
|---|
| 170 | n/a | """make: Make a new element |
|---|
| 171 | n/a | Keyword argument new: the class of the new element |
|---|
| 172 | n/a | Keyword argument at: the location at which to insert the element |
|---|
| 173 | n/a | 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 |
|---|
| 174 | n/a | Keyword argument with_properties: the initial values for the properties of the element |
|---|
| 175 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 176 | n/a | Returns: to the new object(s) |
|---|
| 177 | n/a | """ |
|---|
| 178 | n/a | _code = 'core' |
|---|
| 179 | n/a | _subcode = 'crel' |
|---|
| 180 | n/a | |
|---|
| 181 | n/a | aetools.keysubst(_arguments, self._argmap_make) |
|---|
| 182 | n/a | if _no_object is not None: raise TypeError, 'No direct arg expected' |
|---|
| 183 | n/a | |
|---|
| 184 | n/a | |
|---|
| 185 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 186 | n/a | _arguments, _attributes) |
|---|
| 187 | n/a | if _arguments.get('errn', 0): |
|---|
| 188 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 189 | n/a | # XXXX Optionally decode result |
|---|
| 190 | n/a | if _arguments.has_key('----'): |
|---|
| 191 | n/a | return _arguments['----'] |
|---|
| 192 | n/a | |
|---|
| 193 | n/a | _argmap_move = { |
|---|
| 194 | n/a | 'to' : 'insh', |
|---|
| 195 | n/a | 'replacing' : 'alrp', |
|---|
| 196 | n/a | 'positioned_at' : 'mvpl', |
|---|
| 197 | n/a | 'routing_suppressed' : 'rout', |
|---|
| 198 | n/a | } |
|---|
| 199 | n/a | |
|---|
| 200 | n/a | def move(self, _object, _attributes={}, **_arguments): |
|---|
| 201 | n/a | """move: Move object(s) to a new location |
|---|
| 202 | n/a | Required argument: the object(s) to move |
|---|
| 203 | n/a | Keyword argument to: the new location for the object(s) |
|---|
| 204 | n/a | Keyword argument replacing: Specifies whether or not to replace items in the destination that have the same name as items being moved |
|---|
| 205 | n/a | Keyword argument positioned_at: Gives a list (in local window coordinates) of positions for the destination items |
|---|
| 206 | n/a | Keyword argument routing_suppressed: Specifies whether or not to autoroute items (default is false). Only applies when moving to the system folder. |
|---|
| 207 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 208 | n/a | Returns: to the object(s) after they have been moved |
|---|
| 209 | n/a | """ |
|---|
| 210 | n/a | _code = 'core' |
|---|
| 211 | n/a | _subcode = 'move' |
|---|
| 212 | n/a | |
|---|
| 213 | n/a | aetools.keysubst(_arguments, self._argmap_move) |
|---|
| 214 | n/a | _arguments['----'] = _object |
|---|
| 215 | n/a | |
|---|
| 216 | n/a | aetools.enumsubst(_arguments, 'alrp', _Enum_bool) |
|---|
| 217 | n/a | aetools.enumsubst(_arguments, 'mvpl', _Enum_list) |
|---|
| 218 | n/a | aetools.enumsubst(_arguments, 'rout', _Enum_bool) |
|---|
| 219 | n/a | |
|---|
| 220 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 221 | n/a | _arguments, _attributes) |
|---|
| 222 | n/a | if _arguments.get('errn', 0): |
|---|
| 223 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 224 | n/a | # XXXX Optionally decode result |
|---|
| 225 | n/a | if _arguments.has_key('----'): |
|---|
| 226 | n/a | return _arguments['----'] |
|---|
| 227 | n/a | |
|---|
| 228 | n/a | _argmap_open = { |
|---|
| 229 | n/a | 'using' : 'usin', |
|---|
| 230 | n/a | 'with_properties' : 'prdt', |
|---|
| 231 | n/a | } |
|---|
| 232 | n/a | |
|---|
| 233 | n/a | def open(self, _object, _attributes={}, **_arguments): |
|---|
| 234 | n/a | """open: Open the specified object(s) |
|---|
| 235 | n/a | Required argument: list of objects to open |
|---|
| 236 | n/a | Keyword argument using: the application file to open the object with |
|---|
| 237 | n/a | 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 |
|---|
| 238 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 239 | n/a | """ |
|---|
| 240 | n/a | _code = 'aevt' |
|---|
| 241 | n/a | _subcode = 'odoc' |
|---|
| 242 | n/a | |
|---|
| 243 | n/a | aetools.keysubst(_arguments, self._argmap_open) |
|---|
| 244 | n/a | _arguments['----'] = _object |
|---|
| 245 | n/a | |
|---|
| 246 | n/a | |
|---|
| 247 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 248 | n/a | _arguments, _attributes) |
|---|
| 249 | n/a | if _arguments.get('errn', 0): |
|---|
| 250 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 251 | n/a | # XXXX Optionally decode result |
|---|
| 252 | n/a | if _arguments.has_key('----'): |
|---|
| 253 | n/a | return _arguments['----'] |
|---|
| 254 | n/a | |
|---|
| 255 | n/a | _argmap_print_ = { |
|---|
| 256 | n/a | 'with_properties' : 'prdt', |
|---|
| 257 | n/a | } |
|---|
| 258 | n/a | |
|---|
| 259 | n/a | def print_(self, _object, _attributes={}, **_arguments): |
|---|
| 260 | n/a | """print: Print the specified object(s) |
|---|
| 261 | n/a | Required argument: list of objects to print |
|---|
| 262 | n/a | Keyword argument with_properties: optional properties to be included with the print command sent to the application that prints the direct object |
|---|
| 263 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 264 | n/a | """ |
|---|
| 265 | n/a | _code = 'aevt' |
|---|
| 266 | n/a | _subcode = 'pdoc' |
|---|
| 267 | n/a | |
|---|
| 268 | n/a | aetools.keysubst(_arguments, self._argmap_print_) |
|---|
| 269 | n/a | _arguments['----'] = _object |
|---|
| 270 | n/a | |
|---|
| 271 | n/a | |
|---|
| 272 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 273 | n/a | _arguments, _attributes) |
|---|
| 274 | n/a | if _arguments.get('errn', 0): |
|---|
| 275 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 276 | n/a | # XXXX Optionally decode result |
|---|
| 277 | n/a | if _arguments.has_key('----'): |
|---|
| 278 | n/a | return _arguments['----'] |
|---|
| 279 | n/a | |
|---|
| 280 | n/a | def quit(self, _no_object=None, _attributes={}, **_arguments): |
|---|
| 281 | n/a | """quit: Quit the Finder |
|---|
| 282 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 283 | n/a | """ |
|---|
| 284 | n/a | _code = 'aevt' |
|---|
| 285 | n/a | _subcode = 'quit' |
|---|
| 286 | n/a | |
|---|
| 287 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 288 | n/a | if _no_object is not None: raise TypeError, 'No direct arg expected' |
|---|
| 289 | n/a | |
|---|
| 290 | n/a | |
|---|
| 291 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 292 | n/a | _arguments, _attributes) |
|---|
| 293 | n/a | if _arguments.get('errn', 0): |
|---|
| 294 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 295 | n/a | # XXXX Optionally decode result |
|---|
| 296 | n/a | if _arguments.has_key('----'): |
|---|
| 297 | n/a | return _arguments['----'] |
|---|
| 298 | n/a | |
|---|
| 299 | n/a | def select(self, _object, _attributes={}, **_arguments): |
|---|
| 300 | n/a | """select: Select the specified object(s) |
|---|
| 301 | n/a | Required argument: the object to select |
|---|
| 302 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 303 | n/a | """ |
|---|
| 304 | n/a | _code = 'misc' |
|---|
| 305 | n/a | _subcode = 'slct' |
|---|
| 306 | n/a | |
|---|
| 307 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 308 | n/a | _arguments['----'] = _object |
|---|
| 309 | n/a | |
|---|
| 310 | n/a | |
|---|
| 311 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 312 | n/a | _arguments, _attributes) |
|---|
| 313 | n/a | if _arguments.get('errn', 0): |
|---|
| 314 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 315 | n/a | # XXXX Optionally decode result |
|---|
| 316 | n/a | if _arguments.has_key('----'): |
|---|
| 317 | n/a | return _arguments['----'] |
|---|
| 318 | n/a | |
|---|
| 319 | n/a | _Enum_list = None # XXXX enum list not found!! |
|---|
| 320 | n/a | _Enum_bool = None # XXXX enum bool not found!! |
|---|
| 321 | n/a | |
|---|
| 322 | n/a | # |
|---|
| 323 | n/a | # Indices of types declared in this module |
|---|
| 324 | n/a | # |
|---|
| 325 | n/a | _classdeclarations = { |
|---|
| 326 | n/a | } |
|---|
| 327 | n/a | |
|---|
| 328 | n/a | _propdeclarations = { |
|---|
| 329 | n/a | } |
|---|
| 330 | n/a | |
|---|
| 331 | n/a | _compdeclarations = { |
|---|
| 332 | n/a | } |
|---|
| 333 | n/a | |
|---|
| 334 | n/a | _enumdeclarations = { |
|---|
| 335 | n/a | } |
|---|