Scripts: text edits refuse hidden or locked type, and lists start with the topmost frame

- Text edits (contents, added text, character and paragraph attributes)
  throw Cannot edit with nothing changed when the frame, or a layer or
  group it is in, is hidden or locked.
- Text added after a range that ends inside a character goes after that
  character, and styling an empty range changes nothing.
- Point changes that wait are written before a call that is put back on
  failure, and before the points of another path are read, so a failed
  call does not drop them.
- A new path's id is read exactly from the command's result.
- A saved or Recent preset's rows above 1,000 read as 1,000, so file.new
  takes the preset as file.newPresets lists it.
- textFrames lists type topmost first, as pageItems does on main; the
  tests and docs/mcp.md follow.
This commit is contained in:
dotCooCoo committed 2026-11-25 21:21:28 -08:00
1 parent bc731da716
commit a22c730c03
8 files changed
+140 -35

No files matched your search

+1 -1
View File
@@ -2838,7 +2838,7 @@ app through the global object `vc`, and writes to the Script Console and runs ot
those pages list, such as `app.version` and `Document.save()`, and the members of the pages of the page-item kinds
themselves, such as a placed item's `file`, are not defined yet and read as `undefined`.
- `Document.textFrames` (https://ai-scripting.docsforadobe.dev/jsobjref/TextFrameItems/) lists the document's type
objects in paint order, those inside groups included, with `length`, `[i]`, `index(key)`, `getByName(name)` and
objects topmost first, as `pageItems` lists them, those inside groups included, with `length`, `[i]`, `index(key)`, `getByName(name)` and
`removeAll()`. `add()` makes empty point type at the origin and `pointText(anchor, orientation?)` at `anchor`, both
with `text.create`; `areaText(path, orientation?)` and `pathText(path, startTValue?, endTValue?, orientation?)` turn
a `PathItem` into area type or type on a path with `text.createInPath`, the orientation being a `TextOrientation`