Scripts: File › Scripts runs the text its check read, with includes from the checked folder

The menu item checked a listed script and then ran script.run by its path,
which opened the file again; a link put in place of the file or a folder on
its path in between could make it run a file the check never saw, and the
include folder was looked up from the path again as well.

script.run takes installed: true. With a path it reads the file once through
script::folder::read, runs that text, and reads #include and $.evalFile in the
Scripts folder's real path followed by the names that read found. The menu
item runs script.run {path, installed: true}.
This commit is contained in:
dotCooCoo
2026-11-14 15:37:18 -08:00
parent 9ddbf25bef
commit 828817c4b2
8 changed files with 131 additions and 23 deletions
+3
View File
@@ -2520,6 +2520,9 @@ The rest of this section is VectorCraft's own rules:
`The Scripts folder cannot be read`.
- A listed file is checked again when it is chosen. A file that is gone, is no longer a `.js` or `.jsx` file under
the folder, or is or lies behind a link ends with `the script is no longer in the Scripts folder`, and nothing runs.
The file is read once for that check, and the text that read checked is the text that runs; its `#include` lines
and `$.evalFile` read in the folder that read found. `script.run {path, installed: true}` runs a listed script the
same way.
- The web build has no Scripts folder, and neither has a run with `VECTORCRAFT_NO_PREFS` set.
`script.listInstalled {}` returns the same listing: `{folder, scripts: [{path, label, folders}], truncated,