A recovery copy's details now say that a script's command changed the
document before the new document entry is written, and a restore writes
a copy's details before its document entry in the new area. A crash
between the two writes no longer restores a script-changed document
without that record, so a later run cannot read the files its links name.
The docs say that a linked file in one of the script's own places inside
the settings folder is still read.
The read check for the files the documents link to now applies the script
scope's fence of the folder that holds the settings, as the script's own
reads do. A file in a place left open inside that folder is still read.
The commands a script runs could read the files that the documents open
at the run's start link to, and could read and write the files of every
open document. Both lists were taken from the documents as they were, so
a document a script opened, or a link or data set value a script added,
widened what the next run could read, and a document opened from a
linked file could be saved over that file in the next run.
- DocState::by_script records what scripts' commands did to a document
since the person last opened or saved it: opened it, or changed it or
gave it another file, keeping the document, its file and the file it
was read from as they were before. The script host notes it after
every command, and a save the person makes from the document's current
content clears it. Revert keeps it, and a recovery copy restores the
document as one a script opened.
- The gate's document files and the linked files are taken from each
document as the person left it (DocState::as_person_left). A document
a script opened gives neither, in that run or a later one.
- This replaces the per-run record of paths read through the linked
files and ScriptGate::keeping_linked_read_only.
- docs/mcp.md and docs/target-app-parity.md describe the rule.
The gate now records each path a script's command reads only because it led
to a file the open documents link to. A document whose file is such a path is
taken out of the open documents' files for the rest of the run, without
looking at where the path leads now or what the script may read now. Before,
the gate decided that again for each command from the path's current target,
so a path pointed at another file by a link, or a read grant given later,
let the run read and write through the document.
A command a script runs with vc.run could read only the script's own places
and the open documents' own files, so an export, save, print or package of
a document whose linked images or placed files sit elsewhere fell back to
the saved previews.
The script gate now also reads, and never writes, the files that the
documents open when the run began link to: linked images, placed files, the
plate files of a DCS image and the images their data sets name. The list is
taken once, at the run's first vc.run, from those documents as they were
when the run began, and holds real paths, so a path that leads to another
file later is refused. A link the script adds or re-points, a path it names
itself and a document it opens give it no further file to read, a document
it opens from one of these files is not saved over it, and the automation
read roots and the name and traversal rules still apply first.
The system font scan built each face from its name, fvar, OS/2, head and
post tables only, so a family that was found but not loaded never had
Thai in its traits. The font menus' Thai filter left such families out,
and Show Similar Fonts grouped them with the other scripts until they
were loaded.
- A face sets Thai when its OS/2 table allows it (no OS/2 table, the
Thai Unicode range, bit 24, or the Thai code page, bit 16) and its
character map has Thai, loaded or scanned.
- The scan reads the cmap table of such a face only, up to 16 MiB.
The search for a document's missing fonts reads no cmap table, so
its byte limit covers the same tables as before.
When the same segment appears more than once among the second segments,
its roots were found once per copy, and each copy's places were checked
against every second segment. The sorted places now drop exact repeats
before they are checked. Places that differ, however close, are all kept,
so the circles found do not change.
A live edit changes the document without an undo step, so the tool was
not told about it. Circles found while a preview moved the second
segment stayed cached under the same segment key, and a click after the
preview was canceled drew the cached circle instead of one touching the
segment where it is again. A first segment picked during a preview kept
its old shape the same way.
The cache key now holds the shapes of the first segment and of the
segments a circle may touch, so moving along an unchanged segment still
reuses the search. The first segment is forgotten when its shape no
longer matches the document, and a press on the second segment follows
the segments as they are at the release; a pressed segment that is gone
leaves nothing to touch.
docs/target-app-parity.md gets a line for the file.write report on a
File object's length, hidden and readonly and for the test that lists
every name the script host adds, with the tests that cover them. The
test's comment on vc no longer names another app.
Setting a File object's length truncates or pads the file, and setting
readonly or hidden changes it, but script.check reported no outside
category for those assignments. It now reports file.write and
filesWritten for them: plain and compound assignment, ++ and -- before
or after, and the property name as a string literal in brackets.
A new integration test lists every global and member the script host
adds to the JavaScript engine (the own properties of the global object,
of each object or function it holds and of each function's prototype,
compared with a plain engine) and fails when one has no row. Each name
that reaches outside the document has a probe script, and the test
checks that script.check gives it the expected outside id. vc is listed
as not checked: script.check reads scripts written for the reference
app's scripting, and what vc.run does depends on the command. The test
also checks that the checker lists every preprocessor directive the
host reads, through the new DirectiveName::ALL.
File object properties:
https://extendscript.docsforadobe.dev/file-system-access/file-object/