- paletteClose with another engine's palette id no longer drops that
palette's waiting events.
- A hidden palette is not described after a run or an add, so a
throwing getter on it no longer fails the run; script.palettes and
docs/mcp.md say a hidden palette lists its controls as they were.
- A check box's click rechecks the box after reading its value, so a
getter that disables it or closes the palette stops the click.
- A list's change rechecks that the list is still enabled and visible
after its item texts are read, and is dropped when a getter disabled
or hid it.
- A waiting palette event does not start its run, or ask for frames,
while the last run's print jobs wait for their answer.
- script.palette.event's help states that a change merges only after
its palette's last waiting click or close.
- update() takes a waiting palette event only when the run's file access
roots reach the same files as the event's, so a handler never runs with
less access than its palette was shown with.
- A palette event is no longer delivered to a handler after its palette
was hidden and shown again, or after a capturing listener disabled or
hid the control or a group above it.
- A limit that ends a handler update() took restores the run's own
actions before the end-of-run refresh.
- A palette refresh that fails reports no unhandled rejection.
- A refused palette field text no longer replaces text typed after it.
- The script.run, script.palette.event and docs texts describe update()
delivery, list staleness after item edits, and repeating a click or
close dropped with an oversized text.
The startup scripts run at launch no longer list the print service's
printers, so the first window does not wait on it; a script.startup.run
with any other reason still lists them. A script's print jobs that the
desktop's worker fails to send are shown in the status bar even when a
later line, a later batch that was sent or a startup script's failure
took it, and the startup script's notes stay in the hover.
script.startup.run's params text describes the print wait and the
launch rule.
A getter read after a button while the palette was described could
disable or hide the button, or a group above it, after the description
recorded it as enabled, and the click still ran its handler.
- Palette states are read without running a getter, once every
description getter (the default and cancel elements included) has
run, and a state that a getter gives counts as off. Dialogs keep
reading the states through their getters.
- Delivering a palette event reads the states of the control and the
groups above it again the same way, and checks that the palette still
holds the control, before the handler runs.
- docs/mcp.md, the progress line and script.palette.event's params text
describe the rule.
File.parent gives a folder in URI notation (/c/Users/..., with %20 for a
space). $.evalFile joined that text to the script's folder as written, so
on Windows $.evalFile(File($.fileName).parent + '/more.jsx') looked under
C:\c\Users\... and reported "include file not found".
When an absolute path starting with one / names no file the script may
read, $.evalFile now also tries it with its escapes decoded and, on
Windows, with /c/... as the drive C:. The path as written is still tried
first, and the scope check, the .. refusal and the file limits apply to
every form. Share and device paths are not converted, and #include lines
are read as before.
- script.palette.event with nobody to ask answers with the report of the
run that handled the given event, also when it took the place of an
earlier waiting event or a run of its engine took it with update(); an
event dropped without a run is an error, and a later event that cannot
start leaves the given event's result. An open drag in a document other
than the active one is refused before the event waits, and the app's
palette start check uses the same rule.
- A palette event's handler and the refresh after a run take no waiting
event through update(), so a later event does not run inside them. The
refresh after a named run spends at most the unbroken-run allowance.
- A click whose button a getter removed during the event runs no handler.
- A window answer that could not reach the script lists the dialog with
the answer "error" instead of "stop".
- In a ScriptUI dialog, Escape, ui.dialog.cancel and a click keep the typed
texts when the run does not take the event, and a refused event asks for
the next frame so the queued events after it go on.
- Quitting while only palettes are open asks whether to stop the run.
A waiting palette event merges with a newer one only when both have the
same file access scope, and a click or close merges only after its
palette's last waiting change. A text typed in a field keeps the scope
of each pass that edited it and goes to the script under what both that
scope and the committing pass allow; a click or close that commits it
takes those limits too. Passes recorded before the app takes them stay
separate. Scope coverage checks root containment instead of comparing
the same roots object, and the progress line describes when update()
runs a waiting event.
PathItem now takes PageItem's translate, rotate and resize: main's PathItem versions are removed, and resize on a path keeps main's changeLineWidths percent for the stroke weight. Hidden objects are refused, and an identity transform of an empty path checks its Transformation value and does nothing.
script.run's params text now says what app.undo() and app.redo() do. The artboardLayout messages,
their test and their catalog rows go back to main's text; they belong to file.new rather than to
script history.
- Adding a control or an item, and removing items, builds both arrays
before the first write, so a run that ends at the heap limit leaves the
lists and the dialog's counts as they were.
- A listener registered after an event started does not hear it in a later
phase, a capturing container's re-registration included.
- show() reads the dialog again when a getter changes a list item's text
after the item was read.
- Enter and Escape skip an OK or Cancel button inside a hidden or disabled
container.
- A resource string of a name and a type without braces throws a
SyntaxError, and a \u escape pair of surrogates reads as one character.
- In the app, queued events wait while another dialog is open over the
script's dialog, and the run's own questions wait while a popup, such as
an open drop-down list, is over it. ui.dialog.confirm and
ui.dialog.cancel take only the dialog, ui.dialog.set needs a field or an
action and answers with the dialog it set, and OK is refused while a
dialog open over it waits. A cancel after typed text clicks the cancel
button the dialog has when its turn comes, and an immediate cancel the
run refuses is an error.
- A click on a list box row gives the list the keyboard focus.
- The vc hint test names BridgeTalk, since Window now exists; the params
text and docs/mcp.md say that a show() in a handler notify runs throws
only in the app, and define_script_ui says when end is not called.
script::folder::list and script::startup::list measured the 250 ms
listing limit (MAX_SCAN) with a real Instant. script.listInstalled,
script.startup.run and the File > Scripts menu read the folders through
them, so a test that went through any of these got a truncated listing
and missing scripts whenever the disk stalled for 250 ms.
- folder::Clock is either Wall (the real time since the listing started,
the default) or Fixed (the same time at every check). Both list
functions take one.
- Session::set_script_listing_clock sets the clock the two commands and
the menu's listing job use; the app keeps the real clock.
- The script folder, startup script, scripts menu, script run and Safe
Mode tests list with a fixed zero time, so a slow disk cannot cut a
listing short. Direct listing calls use the test file's list helper.
- New tests check that script.listInstalled, script.startup.run and the
menu stop at the session's clock once it is past the limit and list
everything at the limit.
The chosen script is prepared only after the skip check, so a skipped round leaves its read to script.run. The new startup tests use a TempDir that removes the folder when the test ends.
A startup script refused before it begins, such as with an undo group
open, is named in the Script Console. Stopping the runs from the quit
prompt between two queued runs drops the runs not yet started, and the
status bar says so. While that prompt is open, or before its answer is
taken, the next run does not start.
script.grants.revoke matched a path both as given and with its links
followed, so revoking a grant whose path is now a link to another
granted path removed both grants. The spellings are now tried in order,
the path as given first, and only the first script and path pair that
some grant holds is removed.
script.startup.run checks then's parameters as script.run checks them,
before any startup script runs. In the app, the message of a startup
script that fails or is stopped, through the quit prompt too, stays in
the status bar's notes after the chosen script ends.
A grant whose path a link has since replaced is listed by script.grants
under the path it was kept for, but script.grants.revoke followed the
link and compared the link's target, so Revoke in Script File Access
removed nothing. A path is now matched as given and, inside the
automation read roots, also with its links followed.
new Window() and add() threw that resource specifications were not
available yet. They now read a resource specification in place of the
type, as
https://extendscript.docsforadobe.dev/user-interface-tools/resource-specifications/
describes it: a type, then braces holding `name: value` properties,
where `name: Class { ... }` defines a control.
- `crates/js/src/scriptui_resource.rs` reads `[name:] Type { ... }`.
A value is null, true, false, a quoted string, a number, an inline
array or an inline object. The commas between properties may be left
out, as in the page's own example. A malformed specification throws a
SyntaxError. One longer than 1 MiB or nested more than 64 deep throws
a RangeError; these limits are VectorCraft's own.
- With a resource specification, new Window() and add() read no other
argument. `properties` gives the creation properties. Each control in
the braces is added through add(), with its limits of 512 controls
nested 16 deep, and set as the container's property of its name. A
list's `items` gives its item texts, as add()'s third argument does.
Each other value is assigned to the property of its name. Palettes and
windows still throw that they are not available yet.
- The script.run params text, docs/mcp.md and the Scripts line in
docs/target-app-parity.md describe resource specifications.
A headless window step whose control matched no name fell back to the
first control with that text, even when that control had a name of its
own, so a step could reach a different control than the one it named.
The text now matches only controls without a name.
- When a click on the default or cancel button has no handler of the button's
own, a listener on a container that calls close(result) now decides what
show() returns; before, the button's result 1 or 2 replaced it.
- An event on objects made to look like controls whose parents form a cycle
ends with a TypeError once the chain is longer than a dialog's nesting
allows, instead of walking the cycle until the run's fuel is gone.
- The Run Script params text says that an unknown event type throws, and the
progress line says that only the dialog takes a show listener.
- Each ScriptUI element gets an id that the dialog's description carries. The
app keeps a queued click or change, and each typed text, with its control's
id instead of the control's position in its container, so a handler that
removes a control no longer sends a later click or typed text to the control
that moved into its place. An event whose control was removed is dropped,
and so is a queued list change when a handler changed the list's items.
- A container that no longer holds the control when its turn comes does not
get the event, and a listener that an earlier one removed in the same event
does not run. The containers above the target stay kept from collection
while the listeners run.
- A removed control and the controls it holds have no `window`; `removeAll`
throws on them like `add` and `remove`.
- Every element starts with its listener list, which a script cannot replace,
and `remove` and `removeAll` refuse an object made to look like an element
of a real dialog.
- docs/mcp.md says a group takes its properties fourth when the third argument
is not an object, as the code does.
- A control with alignment fill stays within its maximumSize when its
container's room is larger.
- A window or control takes at most 256 event listeners (VectorCraft's
own limit); one more throws a RangeError. A show listener can be
added only to the dialog, and on a control it throws an Error.
- A capturing listener on a container that stops a click keeps the
default or cancel button from closing the dialog. Listeners on the
containers that do not capture still leave the button to close it.
- stopPropagation() acts only on an event whose listeners are running,
and preventDefault() does nothing, since the events are not
cancelable.
- A control removed from its container has no parent, its events no
longer reach the containers it was in, and add and remove on it, or
on a control it holds, throw an Error. Its controls are no longer
counted toward the dialog's limits.
- remove(text) throws an Error, and removes nothing, when a text getter
changes the list or container while it looks for a match.
- A group takes its creation properties fourth again when the third
argument is not an object, as in add("group", undefined, undefined,
{name: "g"}).
- A click on a radio button now turns off only the radio buttons of its
set, the ones added next to it with no other kind of control between
them. It used to turn off every radio button in its container.
Docs: docs/mcp.md now says that notify runs the handlers without closing
the dialog.
- Every element starts with preferredSize, size, minimumSize and
maximumSize objects whose width and height are -1, so a script can
set one side, as in preferredSize.width = 100. A positive side of
size takes the place of preferredSize's, and the layout keeps a
control within its minimum and maximum.
- Controls and the dialog take addEventListener and
removeEventListener for click, change, changing and show. Handlers
run in the capture phase on the containers, on the control after its
onClick, onChange or onChanging, then on the containers again until
one calls stopPropagation(). A button with a click listener no longer
closes the dialog by itself.
- Window.alert, Window.confirm and Window.prompt open the same dialogs
as alert, confirm and prompt.
- A list has find(text) and remove(what), and takes its items in
properties.items; a container has remove(what).
- A group takes its creation properties as the third argument of add(),
and orientation, alignChildren, spacing, margins and alignment given
there are its first values.
- Setting a radio button's value to true turns off the radio buttons
added next to it in its container, and notify("onClick") turns a
radio button on and a check box over before onClick runs.
Docs: docs/mcp.md, docs/target-app-parity.md.