mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-13 01:14:29 -06:00
Scripts: File › Scripts lists the Scripts folder, subfolders as submenus
File › Scripts now lists the .js and .jsx files of the Scripts folder next to the preferences, each named after its file without the extension, with each subfolder as a submenu, above Check Script… and Other Script…. The help page describes this listing: https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/install-and-run-scripts.html Choosing a listed script runs it through script.run without the warning Other Script… shows. script.listInstalled returns the same listing, and ui.runInstalledScript {path} runs one entry. VectorCraft's own rules: the folder is read off the UI thread when the app starts, when its window becomes active and when the File menu of the window's menu bar opens; only names are read; links, junctions, hidden and system entries are left out and checked again before a run; one read stops at 2,048 entries, 512 scripts, 128 subfolders, 4 levels or 250 ms and the menu then notes that some scripts were not listed. Under an automation read root, script.listInstalled and ui.menu.list leave out a folder outside the root. #1183 (LloydNicholson) also proposed a Scripts menu listing a folder.
This commit is contained in:
@@ -36,6 +36,8 @@ use crate::{
|
||||
Clipboard, DocState, DrawMode, EngineError, Journal, NodeId, PaintDefaults, Result, Session, cmd, command_specs, guard, waits_for_tool_edit,
|
||||
};
|
||||
|
||||
pub mod folder;
|
||||
|
||||
/// The most bytes of source a run takes, as a file or as `source`.
|
||||
pub const MAX_SOURCE_BYTES: usize = 8 << 20;
|
||||
/// The instructions a run may execute when `maxFuel` is left out.
|
||||
|
||||
Reference in New Issue
Block a user