1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
\section{\module{aetypes} ---
AppleEvent objects}
\declaremodule{standard}{aetypes}
\platform{Mac}
%\moduleauthor{Jack Jansen?}{email}
\modulesynopsis{Python representation of the Apple Event Object Model.}
\sectionauthor{Vincent Marchetti}{vincem@en.com}
The \module{aetypes} defines classes used to represent Apple Event data
descriptors and Apple Event object specifiers.
Apple Event data is contained in descriptors, and these descriptors
are typed. For many descriptors the Python representation is simply the
corresponding Python type: \code{typeText} in OSA is a Python string,
\code{typeFloat} is a float, etc. For OSA types that have no direct
Python counterpart this module declares classes. Packing and unpacking
instances of these classes is handled automatically by \module{aepack}.
An object specifier is essentially an address of an object implemented
in a Apple Event server. An Apple Event specifier is used as the direct
object for an Apple Event or as the argument of an optional parameter.
The \module{aetypes} module contains the base classes for OSA classes
and properties, which are used by the packages generated by
\module{gensuitemodule} to populate the classes and properties in a
given suite.
For reasons of backward compatibility, and for cases where you need to
script an application for which you have not generated the stub package
this module also contains object specifiers for a number of common OSA
classes such as \code{Document}, \code{Window}, \code{Character}, etc.
The \module{AEObjects} module defines the following classes to represent
Apple Event descriptor data:
\begin{classdesc}{Unknown}{type, data}
The representation of OSA descriptor data for which the \module{aepack}
and \module{aetypes} modules have no support, i.e. anything that is not
represented by the other classes here and that is not equivalent to a
simple Python value.
\end{classdesc}
\begin{classdesc}{Enum}{enum}
An enumeration value with the given 4-character string value.
\end{classdesc}
\begin{classdesc}{InsertionLoc}{of, pos}
Position \code{pos} in object \code{of}.
\end{classdesc}
\begin{classdesc}{Boolean}{bool}
A boolean.
\end{classdesc}
\begin{classdesc}{StyledText}{style, text}
Text with style information (font, face, etc) included.
\end{classdesc}
\begin{classdesc}{AEText}{script, style, text}
Text with script system and style information included.
\end{classdesc}
\begin{classdesc}{IntlText}{script, language, text}
Text with script system and language information included.
\end{classdesc}
\begin{classdesc}{IntlWritingCode}{script, language}
Script system and language information.
\end{classdesc}
\begin{classdesc}{QDPoint}{v, h}
A quickdraw point.
\end{classdesc}
\begin{classdesc}{QDRectangle}{v0, h0, v1, h1}
A quickdraw rectangle.
\end{classdesc}
\begin{classdesc}{RGBColor}{r, g, b}
A color.
\end{classdesc}
\begin{classdesc}{Type}{type}
An OSA type value with the given 4-character name.
\end{classdesc}
\begin{classdesc}{Keyword}{name}
An OSA keyword with the given 4-character name.
\end{classdesc}
\begin{classdesc}{Range}{start, stop}
A range.
\end{classdesc}
\begin{classdesc}{Ordinal}{abso}
Non-numeric absolute positions, such as \code{"firs"}, first, or \code{"midd"},
middle.
\end{classdesc}
\begin{classdesc}{Logical}{logc, term}
The logical expression of applying operator \code{logc} to
\code{term}.
\end{classdesc}
\begin{classdesc}{Comparison}{obj1, relo, obj2}
The comparison \code{relo} of \code{obj1} to \code{obj2}.
\end{classdesc}
The following classes are used as base classes by the generated stub
packages to represent AppleScript classes and properties in Python:
\begin{classdesc}{ComponentItem}{which\optional{, fr}}
Abstract baseclass for an OSA class. The subclass should set the class
attribute \code{want} to the 4-character OSA class code. Instances of
subclasses of this class are equivalent to AppleScript Object
Specifiers. Upon instantiation you should pass a selector in
\code{which}, and optionally a parent object in \code{fr}.
\end{classdesc}
\begin{classdesc}{NProperty}{fr}
Abstract baseclass for an OSA property. The subclass should set the class
attributes \code{want} and \code{which} to designate which property we
are talking about. Instances of subclasses of this class are Object
Specifiers.
\end{classdesc}
\begin{classdesc}{ObjectSpecifier}{want, form, seld\optional{, fr}}
Base class of \code{ComponentItem} and \code{NProperty}, a general
OSA Object Specifier. See the Apple Open Scripting Architecture
documentation for the parameters. Note that this class is not abstract.
\end{classdesc}
|