# develop-28 9612 December 1996 — source transcripts, page 2

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-develop-28-9612-december-1996-d696b1/2)

## Transcribed source material

Machine transcriptions and image descriptions; uncertain copy may be marked [illegible]. Verify against the linked originals. Historical rights remain with the original owners.

These are transcribed excerpts, not the full publications. Open the originals for remaining pages.

### PDF page 12

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-develop-28-9612-december-1996-d696b1/2#scan-a7780113c48f9af6daacfdea342c70481973cad50e5385f230459dbbee984fb2)

Transcribed text:

assume the script is looking at a text block that contains the words “Hi there” in
12-point Helvetica type. For the first two examples, formAbsolutePosition is the key
form; for the third example, the key form is formPropertyID, and for the fourth
example it’s formRelativePosition.
Although formRelativePosition is a simple key form, there’s one aspect of handling it
that might not be obvious. The container parameter that your object accessor receives
in this case is a reference not to a container but to an object inside a container in
relation to another object inside that container. In other words, if a script asks for an
object before or after another object in a container, as in
get   nam e   of   t he   wi ndow af t er   wi ndow " Sal es   Char t "
your object accessor will receive a keyForm parameter of formRelativePosition and a
keyData parameter that contains a constant, either kAENext or kAEPrevious. Your
accessor must then find the object either before or after the “contained” object. This
means that to handle formRelativePosition, you’ll have to install an accessor that gets
an object of one type from another object of the same type.
Although the containment hierarchy for Sketch shows that windows don’t contain
other windows, you   will   need a window-from-window accessor installed to handle
formRelativePosition. If your accessors can find an object in a container, finding an
object either before or after that object should be relatively easy, as long as you
remember to install the accessor. Here’s how Sketch installs the accessor for its
window object:
er r or   =   AEI ns t al l Obj ec t Ac c es s or ( c W i ndow,   c W i ndow,
NewOSLAc c es s or Pr oc ( W i ndowFr om Appl i c at i onAc c es s or ) ,   0L,   f al s e) ;
HANDLING EVERY
If a script asks for every one of a certain kind of object, your accessor will receive a
keyForm parameter of formAbsolutePosition and a keyData parameter with a
descriptor type of typeAbsoluteOrdinal and a value of kAEAll, and you’ll return a
descriptor that represents a collection of objects. The Sketch application returns an
AEList of tokens that reference each object. Some examples of script fragments using
every   and their results are shown in Table 4. Again, assume the script is looking at a
text block that contains the words “Hi there” in 12-point Helvetica type.
Each   every   specifies another list level: one   every   will return a list, two will return a
list of lists, and so on. Consider, for instance, this statement that navigates through
the Text suite hierarchy:
get   ev er y   c har ac t er   of   ev er y   wor d   of   ev er y   par agr aph   of   ev er y   doc um ent
develop   Issue 28   December 1996 10
Table 3.   Script fragments using simple keys and their results
Script fragment   Result type   Example result
word 2   word   "there"
character 1 of word 2   character   "t"
size of word 1   number (font size)   12
word before word 2   word   "Hi"

Reading notes: Source text contains hyphenation and irregular word spacing from extraction (e.g., 'nam e', 'Sal es Char t') Text begins mid-document, so the primary heading is not visible

Printed dates: 1996

Languages: English

[Original PDF page 12](https://www.vintageapple.net/files/76fab0ce159489efc741b347ef3b3f876fd261021de3a38b4e3f9ed49633399c/develop-28_9612_December_1996.pdf#page=12)

[Previous transcribed scans](https://www.vintageapple.net/transcripts/media/va-develop-28-9612-december-1996-d696b1/1.md)
