1 """Suite Standard Suite: Common terms for most applications
4 Generated from flap:System Folder:Extensions:Scripting Additions:Dialects:English Dialect
5 AETE/AEUT resource version 1/0, language 0, script 0
15 _argmap_class_info
= {
19 def class_info(self
, _object
=None, _attributes
={}, **_arguments
):
20 """class info: Get information about an object class
21 Required argument: the object class about which information is requested
22 Keyword argument _in: the human language and script system in which to return information
23 Keyword argument _attributes: AppleEvent attribute dictionary
24 Returns: a record containing the object¹s properties and elements
29 aetools
.keysubst(_arguments
, self
._argmap
_class
_info
)
30 _arguments
['----'] = _object
33 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
34 _arguments
, _attributes
)
35 if _arguments
.has_key('errn'):
36 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
37 # XXXX Optionally decode result
38 if _arguments
.has_key('----'):
39 return _arguments
['----']
46 def close(self
, _object
, _attributes
={}, **_arguments
):
47 """close: Close an object
48 Required argument: the object to close
49 Keyword argument saving: specifies whether changes should be saved before closing
50 Keyword argument saving_in: the file in which to save the object
51 Keyword argument _attributes: AppleEvent attribute dictionary
56 aetools
.keysubst(_arguments
, self
._argmap
_close
)
57 _arguments
['----'] = _object
59 aetools
.enumsubst(_arguments
, 'savo', _Enum_savo
)
61 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
62 _arguments
, _attributes
)
63 if _arguments
.has_key('errn'):
64 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
65 # XXXX Optionally decode result
66 if _arguments
.has_key('----'):
67 return _arguments
['----']
73 def count(self
, _object
, _attributes
={}, **_arguments
):
74 """count: Return the number of elements of a particular class within an object
75 Required argument: the object whose elements are to be counted
76 Keyword argument each: the class of the elements to be counted.
77 Keyword argument _attributes: AppleEvent attribute dictionary
78 Returns: the number of elements
83 aetools
.keysubst(_arguments
, self
._argmap
_count
)
84 _arguments
['----'] = _object
87 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
88 _arguments
, _attributes
)
89 if _arguments
.has_key('errn'):
90 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
91 # XXXX Optionally decode result
92 if _arguments
.has_key('----'):
93 return _arguments
['----']
99 def data_size(self
, _object
, _attributes
={}, **_arguments
):
100 """data size: Return the size in bytes of an object
101 Required argument: the object whose data size is to be returned
102 Keyword argument as: the data type for which the size is calculated
103 Keyword argument _attributes: AppleEvent attribute dictionary
104 Returns: the size of the object in bytes
109 aetools
.keysubst(_arguments
, self
._argmap
_data
_size
)
110 _arguments
['----'] = _object
113 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
114 _arguments
, _attributes
)
115 if _arguments
.has_key('errn'):
116 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
117 # XXXX Optionally decode result
118 if _arguments
.has_key('----'):
119 return _arguments
['----']
121 def delete(self
, _object
, _attributes
={}, **_arguments
):
122 """delete: Delete an element from an object
123 Required argument: the element to delete
124 Keyword argument _attributes: AppleEvent attribute dictionary
129 if _arguments
: raise TypeError, 'No optional args expected'
130 _arguments
['----'] = _object
133 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
134 _arguments
, _attributes
)
135 if _arguments
.has_key('errn'):
136 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
137 # XXXX Optionally decode result
138 if _arguments
.has_key('----'):
139 return _arguments
['----']
141 _argmap_duplicate
= {
145 def duplicate(self
, _object
, _attributes
={}, **_arguments
):
146 """duplicate: Duplicate object(s)
147 Required argument: the object(s) to duplicate
148 Keyword argument to: the new location for the object(s)
149 Keyword argument _attributes: AppleEvent attribute dictionary
150 Returns: to the duplicated object(s)
155 aetools
.keysubst(_arguments
, self
._argmap
_duplicate
)
156 _arguments
['----'] = _object
159 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
160 _arguments
, _attributes
)
161 if _arguments
.has_key('errn'):
162 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
163 # XXXX Optionally decode result
164 if _arguments
.has_key('----'):
165 return _arguments
['----']
167 _argmap_event_info
= {
171 def event_info(self
, _object
, _attributes
={}, **_arguments
):
172 """event info: Get information about the Apple events in a suite
173 Required argument: the event class of the Apple events for which to return information
174 Keyword argument _in: the human language and script system in which to return information
175 Keyword argument _attributes: AppleEvent attribute dictionary
176 Returns: a record containing the events and their parameters
181 aetools
.keysubst(_arguments
, self
._argmap
_event
_info
)
182 _arguments
['----'] = _object
185 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
186 _arguments
, _attributes
)
187 if _arguments
.has_key('errn'):
188 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
189 # XXXX Optionally decode result
190 if _arguments
.has_key('----'):
191 return _arguments
['----']
193 def exists(self
, _object
, _attributes
={}, **_arguments
):
194 """exists: Verify if an object exists
195 Required argument: the object in question
196 Keyword argument _attributes: AppleEvent attribute dictionary
197 Returns: true if it exists, false if not
202 if _arguments
: raise TypeError, 'No optional args expected'
203 _arguments
['----'] = _object
206 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
207 _arguments
, _attributes
)
208 if _arguments
.has_key('errn'):
209 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
210 # XXXX Optionally decode result
211 if _arguments
.has_key('----'):
212 return _arguments
['----']
217 'with_data' : 'data',
218 'with_properties' : 'prdt',
221 def make(self
, _no_object
=None, _attributes
={}, **_arguments
):
222 """make: Make a new element
223 Keyword argument new: the class of the new element.
224 Keyword argument at: the location at which to insert the element
225 Keyword argument with_data: the initial data for the element
226 Keyword argument with_properties: the initial values for the properties of the element
227 Keyword argument _attributes: AppleEvent attribute dictionary
228 Returns: to the new object(s)
233 aetools
.keysubst(_arguments
, self
._argmap
_make
)
234 if _no_object
!= None: raise TypeError, 'No direct arg expected'
237 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
238 _arguments
, _attributes
)
239 if _arguments
.has_key('errn'):
240 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
241 # XXXX Optionally decode result
242 if _arguments
.has_key('----'):
243 return _arguments
['----']
249 def move(self
, _object
, _attributes
={}, **_arguments
):
250 """move: Move object(s) to a new location
251 Required argument: the object(s) to move
252 Keyword argument to: the new location for the object(s)
253 Keyword argument _attributes: AppleEvent attribute dictionary
254 Returns: to the object(s) after they have been moved
259 aetools
.keysubst(_arguments
, self
._argmap
_move
)
260 _arguments
['----'] = _object
263 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
264 _arguments
, _attributes
)
265 if _arguments
.has_key('errn'):
266 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
267 # XXXX Optionally decode result
268 if _arguments
.has_key('----'):
269 return _arguments
['----']
271 def open(self
, _object
, _attributes
={}, **_arguments
):
272 """open: Open the specified object(s)
273 Required argument: list of objects to open
274 Keyword argument _attributes: AppleEvent attribute dictionary
279 if _arguments
: raise TypeError, 'No optional args expected'
280 _arguments
['----'] = _object
283 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
284 _arguments
, _attributes
)
285 if _arguments
.has_key('errn'):
286 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
287 # XXXX Optionally decode result
288 if _arguments
.has_key('----'):
289 return _arguments
['----']
291 def _print(self
, _object
, _attributes
={}, **_arguments
):
292 """print: Print the specified object(s)
293 Required argument: list of objects to print
294 Keyword argument _attributes: AppleEvent attribute dictionary
299 if _arguments
: raise TypeError, 'No optional args expected'
300 _arguments
['----'] = _object
303 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
304 _arguments
, _attributes
)
305 if _arguments
.has_key('errn'):
306 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
307 # XXXX Optionally decode result
308 if _arguments
.has_key('----'):
309 return _arguments
['----']
315 def quit(self
, _no_object
=None, _attributes
={}, **_arguments
):
316 """quit: Quit an application program
317 Keyword argument saving: specifies whether to save currently open documents
318 Keyword argument _attributes: AppleEvent attribute dictionary
323 aetools
.keysubst(_arguments
, self
._argmap
_quit
)
324 if _no_object
!= None: raise TypeError, 'No direct arg expected'
326 aetools
.enumsubst(_arguments
, 'savo', _Enum_savo
)
328 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
329 _arguments
, _attributes
)
330 if _arguments
.has_key('errn'):
331 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
332 # XXXX Optionally decode result
333 if _arguments
.has_key('----'):
334 return _arguments
['----']
341 def save(self
, _object
, _attributes
={}, **_arguments
):
342 """save: Save an object
343 Required argument: the object to save
344 Keyword argument _in: the file in which to save the object
345 Keyword argument as: the file type of the document in which to save the data
346 Keyword argument _attributes: AppleEvent attribute dictionary
351 aetools
.keysubst(_arguments
, self
._argmap
_save
)
352 _arguments
['----'] = _object
355 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
356 _arguments
, _attributes
)
357 if _arguments
.has_key('errn'):
358 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
359 # XXXX Optionally decode result
360 if _arguments
.has_key('----'):
361 return _arguments
['----']
363 _argmap_suite_info
= {
367 def suite_info(self
, _object
, _attributes
={}, **_arguments
):
368 """suite info: Get information about event suite(s)
369 Required argument: the suite for which to return information
370 Keyword argument _in: the human language and script system in which to return information
371 Keyword argument _attributes: AppleEvent attribute dictionary
372 Returns: a record containing the suites and their versions
377 aetools
.keysubst(_arguments
, self
._argmap
_suite
_info
)
378 _arguments
['----'] = _object
381 _reply
, _arguments
, _attributes
= self
.send(_code
, _subcode
,
382 _arguments
, _attributes
)
383 if _arguments
.has_key('errn'):
384 raise aetools
.Error
, aetools
.decodeerror(_arguments
)
385 # XXXX Optionally decode result
386 if _arguments
.has_key('----'):
387 return _arguments
['----']
390 class application(aetools
.ComponentItem
):
391 """application - An application program"""
393 class clipboard(aetools
.NProperty
):
394 """clipboard - the clipboard"""
397 class frontmost(aetools
.NProperty
):
398 """frontmost - Is this the frontmost application?"""
401 class name(aetools
.NProperty
):
402 """name - the name"""
405 class selection(aetools
.NProperty
):
406 """selection - the selection visible to the user"""
409 class version(aetools
.NProperty
):
410 """version - the version of the application"""
414 applications
= application
416 class character(aetools
.ComponentItem
):
417 """character - A character"""
419 class color(aetools
.NProperty
):
420 """color - the color"""
423 class font(aetools
.NProperty
):
424 """font - the name of the font"""
427 class size(aetools
.NProperty
):
428 """size - the size in points"""
431 class writing_code(aetools
.NProperty
):
432 """writing code - the script system and language"""
435 class style(aetools
.NProperty
):
436 """style - the text style"""
439 class uniform_styles(aetools
.NProperty
):
440 """uniform styles - the text style"""
444 characters
= character
446 class document(aetools
.ComponentItem
):
447 """document - A document"""
449 class modified(aetools
.NProperty
):
450 """modified - Has the document been modified since the last save?"""
456 class file(aetools
.ComponentItem
):
459 class stationery(aetools
.NProperty
):
460 """stationery - Is the file a stationery file?"""
466 class selection_2d_object(aetools
.ComponentItem
):
467 """selection-object - the selection visible to the user"""
469 class contents(aetools
.NProperty
):
470 """contents - the contents of the selection"""
474 class text(aetools
.ComponentItem
):
477 # repeated property font the name of the font of the first character
479 class text_style_info(aetools
.ComponentItem
):
480 """text style info - On and Off styles of text run"""
482 class on_styles(aetools
.NProperty
):
483 """on styles - the styles that are on for the text"""
486 class off_styles(aetools
.NProperty
):
487 """off styles - the styles that are off for the text"""
491 text_style_infos
= text_style_info
493 class window(aetools
.ComponentItem
):
494 """window - A window"""
496 class bounds(aetools
.NProperty
):
497 """bounds - the boundary rectangle for the window"""
500 class closeable(aetools
.NProperty
):
501 """closeable - Does the window have a close box?"""
504 class titled(aetools
.NProperty
):
505 """titled - Does the window have a title bar?"""
508 class index(aetools
.NProperty
):
509 """index - the number of the window"""
512 class floating(aetools
.NProperty
):
513 """floating - Does the window float?"""
516 class modal(aetools
.NProperty
):
517 """modal - Is the window modal?"""
520 class resizable(aetools
.NProperty
):
521 """resizable - Is the window resizable?"""
524 class zoomable(aetools
.NProperty
):
525 """zoomable - Is the window zoomable?"""
528 class zoomed(aetools
.NProperty
):
529 """zoomed - Is the window zoomed?"""
532 class visible(aetools
.NProperty
):
533 """visible - Is the window visible?"""
539 class insertion_point(aetools
.ComponentItem
):
540 """insertion point - An insertion location between two objects"""
543 insertion_points
= insertion_point
544 application
._propdict
= {
545 'clipboard' : clipboard
,
546 'frontmost' : frontmost
,
548 'selection' : selection
,
551 application
._elemdict
= {
553 character
._propdict
= {
557 'writing_code' : writing_code
,
559 'uniform_styles' : uniform_styles
,
561 character
._elemdict
= {
563 document
._propdict
= {
564 'modified' : modified
,
566 document
._elemdict
= {
569 'stationery' : stationery
,
573 selection_2d_object
._propdict
= {
574 'contents' : contents
,
576 selection_2d_object
._elemdict
= {
583 text_style_info
._propdict
= {
584 'on_styles' : on_styles
,
585 'off_styles' : off_styles
,
587 text_style_info
._elemdict
= {
591 'closeable' : closeable
,
594 'floating' : floating
,
596 'resizable' : resizable
,
597 'zoomable' : zoomable
,
603 insertion_point
._propdict
= {
605 insertion_point
._elemdict
= {
607 class starts_with(aetools
.NComparison
):
608 """starts with - Starts with"""
609 class contains(aetools
.NComparison
):
610 """contains - Contains"""
611 class ends_with(aetools
.NComparison
):
612 """ends with - Ends with"""
613 class _3d_(aetools
.NComparison
):
615 class _3e_(aetools
.NComparison
):
616 """> - Greater than"""
617 class _b3_(aetools
.NComparison
):
618 """„ - Greater than or equal to"""
619 class _3c_(aetools
.NComparison
):
621 class _b2_(aetools
.NComparison
):
622 """¾ - Less than or equal to"""
624 'yes' : 'yes ', # Save objects now
625 'no' : 'no ', # Do not save objects
626 'ask' : 'ask ', # Ask the user whether to save
630 'index' : 'indx', # keyform designating indexed access
631 'named' : 'name', # keyform designating named access
632 'id' : 'ID ', # keyform designating access by unique identifier
636 'plain' : 'plan', # Plain
637 'bold' : 'bold', # Bold
638 'italic' : 'ital', # Italic
639 'outline' : 'outl', # Outline
640 'shadow' : 'shad', # Shadow
641 'underline' : 'undl', # Underline
642 'superscript' : 'spsc', # Superscript
643 'subscript' : 'sbsc', # Subscript
644 'strikethrough' : 'strk', # Strikethrough
645 'small_caps' : 'smcp', # Small caps
646 'all_caps' : 'alcp', # All capital letters
647 'all_lowercase' : 'lowc', # Lowercase
648 'condensed' : 'cond', # Condensed
649 'expanded' : 'pexp', # Expanded
650 'hidden' : 'hidn', # Hidden
655 # Indices of types declared in this module
657 _classdeclarations
= {
659 'tsty' : text_style_info
,
661 'capp' : application
,
662 'csel' : selection_2d_object
,
666 'cins' : insertion_point
,
669 _propdeclarations
= {
674 'ustl' : uniform_styles
,
675 'psct' : writing_code
,
698 _compdeclarations
= {
700 'bgwt' : starts_with
,
709 _enumdeclarations
= {