Phase 3 — Tools
Phase 2 gave you the mechanical skills — commands, fills, geometry, curves. Phase 3 is where those skills become useful in real world scenarios. This phase covers the four areas that turn a working script into a finished tool: text automation, interactive dialogs, file export, and external communication.
These are the lessons most directly connected to the kinds of tasks designers actually need automating. Text operations — finding, replacing, styling, and generating content — are among the most requested scripting use cases in any design tool. Dialogs transform a hardcoded script into something configurable, where a colleague who has never opened a code editor can supply the inputs and get a result. Export pipelines replace the most time-consuming part of a production workflow with a single button press. And networking means scripts can connect to the wider world — pulling in data, pushing results to APIs, and integrating with the systems a team already uses.
Each lesson in this phase also introduces a subtlety that is easy to miss. The Story model is richer and more structured than a simple string API, and getting text operations wrong produces silent failures rather than errors. Dialogs require understanding the control lifecycle — controls are configured before the dialog is shown and read after it closes. Export has a matrix of area types, format presets, and result records that all need to be handled correctly. And networking requires both user permission and careful attention to error handling.
By the end of this phase your scripts will be capable of doing things that were previously only possible through manual work or complex external tooling.
Lessons
| Lesson | Topic | Key skill you'll gain |
|---|---|---|
| 07 — Text & story | Story model, storyRange, formatting, StoryBuilder | Reading, replacing, and styling text in any document |
| 08 — Dialog UI | Dialog, controls, columns, groups, reactive layout | Building native dialogs that collect user input |
| 09 — Export & files | FileExportOptions, FileExportArea, File, HttpRequest | Exporting assets, writing files, calling external APIs |
| 10 — Text threading | TextFrameInterface, createLinkTextFrame, createUnlinkTextFrame | Linking text frames so overflow flows between them |
What to expect
By the end of Phase 3 you should be able to write a script that:
- Reads and replaces text in any text frame using the Story API
- Applies character styles and formatting to a precise range of characters
- Links text frames together so overflow flows across a multi-frame chain
- Presents a dialog with multiple controls and uses the values to drive the script
- Exports every artboard in a document as named PNG files with a JSON manifest
- Reads and writes text files on the Desktop
- Makes an HTTP GET or POST request to an external API
You will also understand why si.storyRange lives on the storyInterface directly and not on si.story, why dialog controls must be configured before runModal() is called and read after it returns, and why error handling matters in network requests. These are the most common sources of confusion in this phase — and knowing them in advance means you will recognise them immediately if you encounter them.