Scripts: visibility variables on embedded images, data sets kept after a no-op import

- variable.setBinding refuses an embedded image only for an image variable,
  so a script can bind an embedded image's visibility.
- A Dataset object stays usable after dataset.import, variable.loadLibrary
  or variable.import leaves the document's data sets as they were, or the
  import is put back; it goes stale only when the data sets change.
- script.check reports a document's exportVariables as filesWritten and
  file.write, and the script host test lists the variable and data set
  names the host adds.

Docs: docs/mcp.md.
This commit is contained in:
dotCooCoo committed 2026-11-21 10:15:47 -08:00
1 parent 90752660ad
commit 6db0f6c1ad
10 files changed
+81 -13

No files matched your search

+4 -3
View File
@@ -2558,9 +2558,10 @@ control character, in the first 8 KiB) or `tooLarge` (over 8 MiB). For a script,
(`app.executeMenuCommand('…')`), each with a count and its lines, and `menuCommands.dynamic` counts the calls
whose argument isn't a string literal.
- `outside` lists what the script does outside the document: `filesWritten` (with the open modes used; setting a
File object's `length`, `hidden` or `readonly` counts too), `filesOpened` (files opened in other apps), `network`,
`nativeCode`, `otherApps` (messages to other apps), `environment` (environment variables), `unseenCode` (`eval`,
`new Function` and `$.evalFile`) and `preferences` (the reference app's preferences changed).
File object's `length`, `hidden` or `readonly` counts too, and so does a document's `exportVariables`),
`filesOpened` (files opened in other apps), `network`, `nativeCode`, `otherApps` (messages to other apps),
`environment` (environment variables), `unseenCode` (`eval`, `new Function` and `$.evalFile`) and `preferences`
(the reference app's preferences changed).
- `problems` lists what would stop the script loading as written (strings, comments, regular expressions,
template literals and XML literals that aren't closed, brackets that don't match, syntax newer than ES3 and
unknown directives) and notes on its text (bytes that aren't valid UTF-8, mixed line endings, and nesting deeper