The Paged PlatformScripting (paged.*)
Host functions
Every paged.* host function available to scripts, grouped by kind — generated directly from the engine's scripting catalog.
ProIIIreference
In short the complete paged.* host surface, grouped by what each function
does. Generated from the engine catalog — if the engine adds a function, it
appears here automatically.
30 host functions, grouped by kind.
Read
| Function | Returns | Summary |
|---|---|---|
| paged.get(id, path) | value | null | Read one property value of the addressed element. |
| paged.inspect(id) | ElementProperties JSON | Full property snapshot for one element (or storyRange). |
| paged.tree() | SceneTreeNode[] JSON | Document hierarchy: spreads → pages → frames. |
| paged.stories() | StorySummary[] JSON | Loaded stories with selfId + characterCount + paragraphCount. The source of valid story ids. |
| paged.layers() | LayerSummary[] JSON | Document layers. |
| paged.swatches() | SwatchSummary[] JSON | Colour palette (selfId/name/kind). |
| paged.paragraphStyles() | ParagraphStyleSummary[] JSON | Paragraph styles — the source of valid styleRefs for applyStyle. |
| paged.characterStyles() | CharacterStyleSummary[] JSON | Character styles. |
| paged.objectStyles() | ObjectStyleSummary[] JSON | Object styles. |
| paged.gradients() | GradientSummary[] JSON | Gradients. |
| paged.colorGroups() | ColorGroupSummary[] JSON | Colour groups. |
| paged.links() | LinkSummary[] JSON | Placed-asset links. |
| paged.conditions() | ConditionSummary[] JSON | Conditional-text conditions. |
| paged.conditionSets() | ConditionSetSummary[] JSON | Condition sets. |
| paged.collection(name) | Summary[] JSON | Generic typed-collection read by name; unknown name → "[]" + warning. |
| paged.documentMeta() | DocumentMeta JSON | Document metadata (name/creator/modified/page count). |
| paged.selection() | ElementId[] JSON | Current element selection. |
| paged.contentSelection() | ContentSelection JSON | null | Current text caret / range. |
Write
| Function | Returns | Summary |
|---|---|---|
| paged.set(id, path, value) | bool | Set a property (see settablePaths) on the addressed element. null clears. |
Author (structural)
| Function | Returns | Summary |
|---|---|---|
| paged.insertText(storyId, offset, text) | bool | Insert plain text at a story body offset; \n splits paragraphs. |
| paged.deleteRange(storyId, start, end) | bool | Delete the [start, end) character range of a story. |
| paged.insertTextFrame(pageId, [t,l,b,r]) | bool | Create an empty text-pourable frame at page-local point bounds. Mints a story (id NOT returned — see constraints). |
| paged.insertFrame(pageId, [t,l,b,r]) | bool | Create an empty graphic (non-text) frame; the usual placeImage target. |
| paged.insertPage(afterPageId?) | bool | Append a page after afterPageId (or at the end), inheriting the default master. |
| paged.placeImage(frameId, uri, fit?) | bool | Place an image into a frame; fit is an optional fitting mode. |
| paged.applyStyle(storyId, start, end, styleRef) | bool | Apply a paragraph/character style to a story range. Scope inferred from the ref prefix (CharacterStyle/… else Paragraph). |
| paged.createGroup([id, ...]) | bool | Group two-or-more elements; <2 valid members returns false. |
History (undo/redo)
| Function | Returns | Summary |
|---|---|---|
| paged.undo() | bool | Undo the last mutation. |
| paged.redo() | bool | Redo the last undone mutation. |
Console
| Function | Returns | Summary |
|---|---|---|
| console.log(...) | undefined | Append a line to the captured output log (also warn/error/info). |
Scripting with paged.*
The Boa-based scripting layer — a sandboxed ECMAScript surface for reading and authoring a paged document through the paged.* host API. The full surface is generated from the engine catalog.
Settable paths & id grammar
The property paths accepted by paged.set, and the id grammar for addressing elements — generated from the engine's scripting catalog.