Files
vectorcraft/crates
dotCooCoo 3ef8961913 Scripts: app.doScript plays an action of the Actions panel
A script can play an action by name with app.doScript(action, set,
dialogs?), the DoScript method of the scripting reference. script.run
takes a new `actions` param, and the app fills it with the Actions
panel's actions and their included steps; a recorded command.batch step
gives its own steps.

- The action and its set are matched by their exact names. A name that
  matches no action or more than one, an action with no included step,
  a stop, and a step a script may not run or the engine does not have
  (a View menu step, or one that plays an action or runs a script)
  throw before any step runs, so an action cannot play itself.
- Each step runs as vc.run runs a command: it joins the run's one undo
  step for each changed document, counts as a host call, and reads and
  writes files only where the script may. A failed step is put back and
  its error gives the step's place, the action and the command.
- A step that acts on the active artboard (paste in place, in front and
  in back, Align, Distribute Objects and Distribute Spacing to the
  artboard, All on Active Artboard, Edit Symbol, Fit to Artwork Bounds
  and Fit to Selected Art) and names no artboard gets the active
  document's active artboard, as the Actions panel's playback gives it.
  The index is the one the artboard had as the run started, clamped to
  the last artboard after a step deletes artboards. While the Artboard
  tool has several artboards selected, a paste step gets none and Fit
  to Artwork Bounds gets those artboards.
- dialogs must be true or false (default false). app.loadAction and
  app.unloadAction throw an error that says they are not available yet.
- `actions` is checked before the script starts: at most 4,096 actions,
  10,000 steps an action, 100,000 in all and 16 MiB.
2026-11-21 13:34:22 -08:00
..
2026-11-19 15:24:38 +07:00
2026-11-19 06:08:29 -08:00
2026-11-20 06:07:45 +07:00