1 """Suite Standard Suite: Common classes and commands for most applications.
4 Generated from /Applications/Utilities/Terminal.app
5 AETE/AEUT resource version 1/0, language 0, script 0
13 class Standard_Suite_Events
:
20 def close(self
, _object
, _attributes
={}, **_arguments
):
21 """close: Close an object.
22 Required argument: the object for the command
23 Keyword argument saving_in: The file in which to save the object.
24 Keyword argument saving: Specifies whether changes should be saved before closing.
25 Keyword argument _attributes: AppleEvent attribute dictionary
30 aetools
.keysubst(_arguments
, self
._argmap
_close
)
31 _arguments
['----'] = _object
33 aetools
.enumsubst(_arguments
, 'savo', _Enum_savo
)
35 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
36 _arguments
, _attributes
)
37 if _arguments
.get('errn', 0):
38 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
39 # XXXX Optionally decode result
40 if _arguments
.has_key('----'):
41 return _arguments
['----']
47 def count(self
, _object
, _attributes
={}, **_arguments
):
48 """count: Return the number of elements of a particular class within an object.
49 Required argument: the object for the command
50 Keyword argument each: The class of objects to be counted.
51 Keyword argument _attributes: AppleEvent attribute dictionary
52 Returns: the reply for the command
57 aetools
.keysubst(_arguments
, self
._argmap
_count
)
58 _arguments
['----'] = _object
61 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
62 _arguments
, _attributes
)
63 if _arguments
.get('errn', 0):
64 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
65 # XXXX Optionally decode result
66 if _arguments
.has_key('----'):
67 return _arguments
['----']
69 def delete(self
, _object
, _attributes
={}, **_arguments
):
70 """delete: Delete an object.
71 Required argument: the object for the command
72 Keyword argument _attributes: AppleEvent attribute dictionary
77 if _arguments
: raise TypeError, 'No optional args expected'
78 _arguments
['----'] = _object
81 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
82 _arguments
, _attributes
)
83 if _arguments
.get('errn', 0):
84 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
85 # XXXX Optionally decode result
86 if _arguments
.has_key('----'):
87 return _arguments
['----']
91 'with_properties' : 'prdt',
94 def duplicate(self
, _object
, _attributes
={}, **_arguments
):
95 """duplicate: Copy object(s) and put the copies at a new location.
96 Required argument: the object for the command
97 Keyword argument to: The location for the new object(s).
98 Keyword argument with_properties: Properties to be set in the new duplicated object(s).
99 Keyword argument _attributes: AppleEvent attribute dictionary
104 aetools
.keysubst(_arguments
, self
._argmap
_duplicate
)
105 _arguments
['----'] = _object
108 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
109 _arguments
, _attributes
)
110 if _arguments
.get('errn', 0):
111 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
112 # XXXX Optionally decode result
113 if _arguments
.has_key('----'):
114 return _arguments
['----']
116 def exists(self
, _object
, _attributes
={}, **_arguments
):
117 """exists: Verify if an object exists.
118 Required argument: the object for the command
119 Keyword argument _attributes: AppleEvent attribute dictionary
120 Returns: the reply for the command
125 if _arguments
: raise TypeError, 'No optional args expected'
126 _arguments
['----'] = _object
129 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
130 _arguments
, _attributes
)
131 if _arguments
.get('errn', 0):
132 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
133 # XXXX Optionally decode result
134 if _arguments
.has_key('----'):
135 return _arguments
['----']
137 def get(self
, _object
, _attributes
={}, **_arguments
):
138 """get: Get the data for an object.
139 Required argument: the object for the command
140 Keyword argument _attributes: AppleEvent attribute dictionary
141 Returns: the reply for the command
146 if _arguments
: raise TypeError, 'No optional args expected'
147 _arguments
['----'] = _object
150 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
151 _arguments
, _attributes
)
152 if _arguments
.get('errn', 0):
153 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
154 # XXXX Optionally decode result
155 if _arguments
.has_key('----'):
156 return _arguments
['----']
161 'with_data' : 'data',
162 'with_properties' : 'prdt',
165 def make(self
, _no_object
=None, _attributes
={}, **_arguments
):
166 """make: Make a new object.
167 Keyword argument at: The location at which to insert the object.
168 Keyword argument new: The class of the new object.
169 Keyword argument with_data: The initial data for the object.
170 Keyword argument with_properties: The initial values for properties of the object.
171 Keyword argument _attributes: AppleEvent attribute dictionary
172 Returns: the reply for the command
177 aetools
.keysubst(_arguments
, self
._argmap
_make
)
178 if _no_object
!= None: raise TypeError, 'No direct arg expected'
181 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
182 _arguments
, _attributes
)
183 if _arguments
.get('errn', 0):
184 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
185 # XXXX Optionally decode result
186 if _arguments
.has_key('----'):
187 return _arguments
['----']
193 def move(self
, _object
, _attributes
={}, **_arguments
):
194 """move: Move object(s) to a new location.
195 Required argument: the object for the command
196 Keyword argument to: The new location for the object(s).
197 Keyword argument _attributes: AppleEvent attribute dictionary
202 aetools
.keysubst(_arguments
, self
._argmap
_move
)
203 _arguments
['----'] = _object
206 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
207 _arguments
, _attributes
)
208 if _arguments
.get('errn', 0):
209 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
210 # XXXX Optionally decode result
211 if _arguments
.has_key('----'):
212 return _arguments
['----']
214 def open(self
, _object
=None, _attributes
={}, **_arguments
):
215 """open: Open an object.
216 Required argument: list of objects
217 Keyword argument _attributes: AppleEvent attribute dictionary
222 if _arguments
: raise TypeError, 'No optional args expected'
223 _arguments
['----'] = _object
226 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
227 _arguments
, _attributes
)
228 if _arguments
.get('errn', 0):
229 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
230 # XXXX Optionally decode result
231 if _arguments
.has_key('----'):
232 return _arguments
['----']
234 def print_(self
, _object
=None, _attributes
={}, **_arguments
):
235 """print: Print an object.
236 Required argument: list of objects
237 Keyword argument _attributes: AppleEvent attribute dictionary
242 if _arguments
: raise TypeError, 'No optional args expected'
243 _arguments
['----'] = _object
246 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
247 _arguments
, _attributes
)
248 if _arguments
.get('errn', 0):
249 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
250 # XXXX Optionally decode result
251 if _arguments
.has_key('----'):
252 return _arguments
['----']
258 def quit(self
, _object
, _attributes
={}, **_arguments
):
259 """quit: Quit an application.
260 Required argument: the object for the command
261 Keyword argument saving: Specifies whether changes should be saved before quitting.
262 Keyword argument _attributes: AppleEvent attribute dictionary
267 aetools
.keysubst(_arguments
, self
._argmap
_quit
)
268 _arguments
['----'] = _object
270 aetools
.enumsubst(_arguments
, 'savo', _Enum_savo
)
272 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
273 _arguments
, _attributes
)
274 if _arguments
.get('errn', 0):
275 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
276 # XXXX Optionally decode result
277 if _arguments
.has_key('----'):
278 return _arguments
['----']
285 def save(self
, _object
, _attributes
={}, **_arguments
):
286 """save: Save an object.
287 Required argument: the object for the command
288 Keyword argument in_: The file in which to save the object.
289 Keyword argument as: The file type in which to save the data.
290 Keyword argument _attributes: AppleEvent attribute dictionary
295 aetools
.keysubst(_arguments
, self
._argmap
_save
)
296 _arguments
['----'] = _object
299 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
300 _arguments
, _attributes
)
301 if _arguments
.get('errn', 0):
302 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
303 # XXXX Optionally decode result
304 if _arguments
.has_key('----'):
305 return _arguments
['----']
311 def set(self
, _object
, _attributes
={}, **_arguments
):
312 """set: Set an object's data.
313 Required argument: the object for the command
314 Keyword argument to: The new value.
315 Keyword argument _attributes: AppleEvent attribute dictionary
320 aetools
.keysubst(_arguments
, self
._argmap
_set
)
321 _arguments
['----'] = _object
324 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
325 _arguments
, _attributes
)
326 if _arguments
.get('errn', 0):
327 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
328 # XXXX Optionally decode result
329 if _arguments
.has_key('----'):
330 return _arguments
['----']
333 class application(aetools
.ComponentItem
):
334 """application - An application's top level scripting object. """
336 class _Prop__3c_Inheritance_3e_(aetools
.NProperty
):
337 """<Inheritance> - All of the properties of the superclass. """
340 _3c_Inheritance_3e_
= _Prop__3c_Inheritance_3e_()
341 class _Prop_frontmost(aetools
.NProperty
):
342 """frontmost - Is this the frontmost (active) application? """
345 frontmost
= _Prop_frontmost()
346 class _Prop_name(aetools
.NProperty
):
347 """name - The name of the application. """
351 class _Prop_version(aetools
.NProperty
):
352 """version - The version of the application. """
355 version
= _Prop_version()
356 # element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
357 # element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
359 applications
= application
361 class item(aetools
.ComponentItem
):
362 """item - A scriptable object. """
364 class _Prop_class_(aetools
.NProperty
):
365 """class - The class of the object. """
368 class _Prop_properties(aetools
.NProperty
):
369 """properties - All of the object's properties. """
375 class color(aetools
.ComponentItem
):
376 """color - A color. """
381 class window(aetools
.ComponentItem
):
382 """window - A window. """
384 class _Prop_bounds(aetools
.NProperty
):
385 """bounds - The bounding rectangle of the window. """
388 class _Prop_closeable(aetools
.NProperty
):
389 """closeable - Whether the window has a close box. """
392 class _Prop_document(aetools
.NProperty
):
393 """document - The document whose contents are being displayed in the window. """
396 class _Prop_floating(aetools
.NProperty
):
397 """floating - Whether the window floats. """
400 class _Prop_id(aetools
.NProperty
):
401 """id - The unique identifier of the window. """
404 class _Prop_index(aetools
.NProperty
):
405 """index - The index of the window in the back-to-front window ordering. """
408 class _Prop_miniaturizable(aetools
.NProperty
):
409 """miniaturizable - Whether the window can be miniaturized. """
412 class _Prop_miniaturized(aetools
.NProperty
):
413 """miniaturized - Whether the window is currently miniaturized. """
416 class _Prop_modal(aetools
.NProperty
):
417 """modal - Whether the window is the application's current modal window. """
420 class _Prop_resizable(aetools
.NProperty
):
421 """resizable - Whether the window can be resized. """
424 class _Prop_titled(aetools
.NProperty
):
425 """titled - Whether the window has a title bar. """
428 class _Prop_visible(aetools
.NProperty
):
429 """visible - Whether the window is currently visible. """
432 class _Prop_zoomable(aetools
.NProperty
):
433 """zoomable - Whether the window can be zoomed. """
436 class _Prop_zoomed(aetools
.NProperty
):
437 """zoomed - Whether the window is currently zoomed. """
443 class document(aetools
.ComponentItem
):
444 """document - A document. """
446 class _Prop_modified(aetools
.NProperty
):
447 """modified - Has the document been modified since the last save? """
450 class _Prop_path(aetools
.NProperty
):
451 """path - The document's path. """
456 application
._superclassnames
= ['item']
457 application
._privpropdict
= {
458 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_
,
459 'frontmost' : _Prop_frontmost
,
461 'version' : _Prop_version
,
463 application
._privelemdict
= {
464 'document' : document
,
467 item
._superclassnames
= []
468 item
._privpropdict
= {
469 'class_' : _Prop_class_
,
470 'properties' : _Prop_properties
,
472 item
._privelemdict
= {
474 color
._superclassnames
= ['item']
475 color
._privpropdict
= {
476 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_
,
478 color
._privelemdict
= {
480 window
._superclassnames
= ['item']
481 window
._privpropdict
= {
482 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_
,
483 'bounds' : _Prop_bounds
,
484 'closeable' : _Prop_closeable
,
485 'document' : _Prop_document
,
486 'floating' : _Prop_floating
,
488 'index' : _Prop_index
,
489 'miniaturizable' : _Prop_miniaturizable
,
490 'miniaturized' : _Prop_miniaturized
,
491 'modal' : _Prop_modal
,
493 'resizable' : _Prop_resizable
,
494 'titled' : _Prop_titled
,
495 'visible' : _Prop_visible
,
496 'zoomable' : _Prop_zoomable
,
497 'zoomed' : _Prop_zoomed
,
499 window
._privelemdict
= {
501 document
._superclassnames
= ['item']
502 document
._privpropdict
= {
503 '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_
,
504 'modified' : _Prop_modified
,
508 document
._privelemdict
= {
510 class _3c_(aetools
.NComparison
):
512 class _3d_(aetools
.NComparison
):
514 class _3e_(aetools
.NComparison
):
515 """> - Greater than """
516 class contains(aetools
.NComparison
):
517 """contains - Contains """
518 class ends_with(aetools
.NComparison
):
519 """ends with - Ends with """
520 class starts_with(aetools
.NComparison
):
521 """starts with - Starts with """
522 class _b2_(aetools
.NComparison
):
523 """\xb2 - Less than or equal to """
524 class _b3_(aetools
.NComparison
):
525 """\xb3 - Greater than or equal to """
527 'ask' : 'ask ', # Ask the user whether or not to save the file.
528 'yes' : 'yes ', # Save the file.
529 'no' : 'no ', # Do not save the file.
534 # Indices of types declared in this module
536 _classdeclarations
= {
537 'capp' : application
,
544 _propdeclarations
= {
546 'c@#^' : _Prop__3c_Inheritance_3e_
,
547 'docu' : _Prop_document
,
548 'hclb' : _Prop_closeable
,
549 'imod' : _Prop_modified
,
550 'isfl' : _Prop_floating
,
551 'ismn' : _Prop_miniaturizable
,
552 'iszm' : _Prop_zoomable
,
553 'pALL' : _Prop_properties
,
554 'pbnd' : _Prop_bounds
,
555 'pcls' : _Prop_class_
,
556 'pidx' : _Prop_index
,
557 'pisf' : _Prop_frontmost
,
558 'pmnd' : _Prop_miniaturized
,
559 'pmod' : _Prop_modal
,
562 'prsz' : _Prop_resizable
,
563 'ptit' : _Prop_titled
,
564 'pvis' : _Prop_visible
,
565 'pzum' : _Prop_zoomed
,
566 'vers' : _Prop_version
,
569 _compdeclarations
= {
575 'bgwt' : starts_with
,
580 _enumdeclarations
= {