Scripts: saveAs and exportFile refuse a file open for writing and scales under 1%

A save or export to a file that a File object holds open for writing throws "Script file is open for writing", and a command the script runs does not write such a file besides the one named (an SVG's images), so the bytes the File writes at the end of the run do not replace the output. horizontalScale and verticalScale take 1 to 776.19, since a raster export writes at least 0.01 pixels per point.

The script checker reports a document's saveAs and exportFile as file writes, and the host name check lists the save, export and open names, option classes and enumerations.
This commit is contained in:
dotCooCoo committed 2026-11-21 17:36:55 -08:00
1 parent 55f7dc9205
commit d14830b6b7
34 files changed
+198 -23

No files matched your search

+21 -5
View File
@@ -284,6 +284,9 @@ pub(crate) struct ScriptGate {
pub(crate) write: ScriptScope,
/// The paths of the open documents' files, as the documents hold them.
pub(crate) documents: Vec<String>,
/// The real paths of the files the script's `File` objects hold open for writing, which a
/// command does not write: the run's end would write the objects' bytes over them.
pub(crate) held: Vec<PathBuf>,
/// Another gate a path must pass as well ([`ScopeHandle::within_current`]).
pub(crate) also: Option<Arc<ScriptGate>>,
}
@@ -312,7 +315,8 @@ impl ScriptGate {
};
// A read-only file is not written over, also where a rename could replace it.
let read_only = matches!(access, Access::Write) && std::fs::metadata(&real).is_ok_and(|m| m.is_file() && m.permissions().readonly());
!read_only && (scoped || self.documents.iter().any(|d| resolve(d).is_ok_and(|d| d == real)))
let held = matches!(access, Access::Write) && self.held.contains(&real);
!read_only && !held && (scoped || self.documents.iter().any(|d| resolve(d).is_ok_and(|d| d == real)))
});
if allowed { Ok(()) } else { Err(format!("Script file access denied: {path}")) }
}
@@ -920,8 +924,13 @@ mod tests {
#[test]
fn a_narrowed_scope_keeps_the_script_gates_of_both() {
let (base, _) = folders("narrowed-gate");
let gate =
|dir: &str| ScriptGate { read: ScriptScope::of_folder(&base.join(dir)), write: ScriptScope::default(), documents: vec![], also: None };
let gate = |dir: &str| ScriptGate {
read: ScriptScope::of_folder(&base.join(dir)),
write: ScriptScope::default(),
documents: vec![],
held: vec![],
also: None,
};
let (inside, other) = (s(base.join("in/a.svg")), s(base.join("outside/secret.svg")));
let reads = |saved: ScopeHandle, gate_here: Option<ScriptGate>| {
let narrowed = match gate_here {
@@ -944,7 +953,8 @@ mod tests {
#[test]
fn a_scope_narrowed_several_times_keeps_every_gate() {
let (base, _) = folders("narrowed-thrice");
let gate = |dir: &Path| ScriptGate { read: ScriptScope::of_folder(dir), write: ScriptScope::default(), documents: vec![], also: None };
let gate =
|dir: &Path| ScriptGate { read: ScriptScope::of_folder(dir), write: ScriptScope::default(), documents: vec![], held: vec![], also: None };
let (inside, other) = (s(base.join("in/a.svg")), s(base.join("outside/secret.svg")));
let narrow = |saved: ScopeHandle, g: ScriptGate| with_script_gate(g, || saved.within_current());
let reads = |h: &ScopeHandle| h.clone().run(|| (check_read(&inside).is_ok(), check_read(&other).is_ok()));
@@ -964,7 +974,13 @@ mod tests {
let (base, _) = folders("gate-read-only");
let out = base.join("out/kept.svg");
std::fs::write(&out, "<svg/>").unwrap();
let gate = ScriptGate { read: ScriptScope::default(), write: ScriptScope::of_folder(&base.join("out")), documents: vec![], also: None };
let gate = ScriptGate {
read: ScriptScope::default(),
write: ScriptScope::of_folder(&base.join("out")),
documents: vec![],
held: vec![],
also: None,
};
let (kept, fresh) = (s(out.clone()), s(base.join("out/new.svg")));
let check = |p: &str| with_script_gate(gate.clone(), || (check_write(p).is_ok(), check_read(p).is_ok()));
assert_eq!(check(&kept), (true, true));
+5 -2
View File
@@ -48,6 +48,9 @@ use super::{
/// The most a scale factor of an export takes, in percent.
pub const MAX_SCALE_PERCENT: f64 = 776.19;
/// The least a scale factor of a raster export takes, in percent: `document.export` writes at least
/// 0.01 pixels per point.
pub const MIN_SCALE_PERCENT: f64 = 1.0;
/// What the run keeps for these members: whether `userInteractionLevel` is `DONTDISPLAYALERTS`.
#[derive(Default)]
@@ -363,8 +366,8 @@ fn raster_map(class: &str, name: &str, d: &Data, p: &mut Map<String, Value>) ->
Data::Number(n) if n.is_finite() => *n,
_ => return Err(HostError::Type(format!("{what} must be a finite number"))),
};
if n <= 0.0 || n > MAX_SCALE_PERCENT {
return Err(HostError::Range(format!("{what} must be more than 0 and at most 776.19")));
if !(MIN_SCALE_PERCENT..=MAX_SCALE_PERCENT).contains(&n) {
return Err(HostError::Range(format!("{what} must be at least 1 and at most 776.19")));
}
let key = if name == "horizontalScale" { "_h" } else { "_v" };
p.insert(key.into(), json!(n));
+10 -4
View File
@@ -116,6 +116,7 @@ pub(crate) const NOT_WRITABLE: &str = "Script file is not open for writing";
pub(crate) const UNENCODABLE: &str = "Script file cannot encode the text";
pub(crate) const WRITE_FAILED: &str = "Script file could not be written";
pub(crate) const READ_ONLY: &str = "Script file is read-only";
pub(crate) const OPEN_FOR_WRITING: &str = "Script file is open for writing";
pub(crate) const NOT_EMPTY: &str = "Script folder is not empty";
pub(crate) const NAME_TAKEN: &str = "Script file name is already in use";
pub(crate) const BAD_NAME: &str = "Script file name must be a name without a folder";
@@ -460,11 +461,12 @@ impl Disk {
}
/// The gate for a command the script runs: the places it reads and writes now, and the files of
/// the open documents, `documents`.
/// the open documents, `documents`, but not the files its `File` objects hold open for writing.
pub(crate) fn gate(&self, documents: Vec<String>) -> crate::file_access::ScriptGate {
// A save, export or open of a `File` the script names reads and writes as its `File` would.
let documents = if self.exact { Vec::new() } else { documents };
crate::file_access::ScriptGate { read: self.scope.clone(), write: self.writes.clone(), documents, also: None }
let held = self.open.values().filter_map(|o| o.target.clone()).collect();
crate::file_access::ScriptGate { read: self.scope.clone(), write: self.writes.clone(), documents, held, also: None }
}
/// The files written since this was last asked, to name in the report.
@@ -684,10 +686,14 @@ impl Disk {
}
/// The real path a save or export of the document to `path` writes, as a `File` opened for
/// writing would write it ([`Disk::target`]), or why it may not: a folder is not a file, and a
/// read-only file is not written over.
/// writing would write it ([`Disk::target`]), or why it may not: a folder is not a file, a
/// read-only file is not written over, and neither is a file a `File` object holds open for
/// writing, whose bytes the run's end would write over the saved file.
pub(crate) fn save_target(&self, path: &str) -> Result<std::path::PathBuf, &'static str> {
let real = self.target(path, true)?;
if self.open.values().any(|o| o.target.as_deref() == Some(real.as_path())) {
return Err(OPEN_FOR_WRITING);
}
match std::fs::metadata(&real) {
Ok(m) if !m.is_file() => Err(NOT_REGULAR),
Ok(m) if m.permissions().readonly() => Err(READ_ONLY),
+65 -1
View File
@@ -271,6 +271,32 @@ fn an_open_documents_file_is_not_saved_over_without_a_grant() {
let _ = std::fs::remove_dir_all(base);
}
/// A save or export to a file a `File` object holds open for writing throws, so the object's bytes
/// written at the end of the run do not replace the saved document.
#[test]
fn a_file_open_for_writing_is_not_saved_over() {
let base = folder("openhandle");
let mut s = session(&base);
let dir = data_folder(&mut s, &base);
s.execute("file.new", &json!({"width": 100, "height": 100})).unwrap();
for (name, call) in
[("a.svg", "app.activeDocument.saveAs(new File(p));"), ("b.png", "app.activeDocument.exportFile(new File(p), ExportType.PNG24);")]
{
let p = quoted(&dir.join(name));
let log = logged(
&mut s,
&base,
&format!(
"Folder.userData; var p = {p}, w = new File(p); w.open('w'); w.write('pending');\ntry {{ {call} vc.log('ran'); }} catch (e) {{ vc.log(e.message); }}"
),
);
assert!(log[0].as_str().unwrap().contains(crate::script::files::OPEN_FOR_WRITING), "{name}: {log}");
assert_eq!(std::fs::read_to_string(dir.join(name)).unwrap(), "pending", "{name}: the File's own bytes");
assert_eq!(s.active().unwrap().path, None, "{name}: the document's file is unchanged");
}
let _ = std::fs::remove_dir_all(base);
}
/// A file `open` reads besides the one it names, here an SVG's linked image, is read only where
/// the script's grants allow, though it is an open document's file.
#[test]
@@ -282,7 +308,7 @@ fn open_reads_linked_files_only_where_the_script_may() {
std::fs::write(&linked, "<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4'><rect width='4' height='4'/></svg>").unwrap();
s.execute("document.open", &json!({"path": linked.to_string_lossy()})).unwrap();
assert!(s.active().unwrap().path.is_some(), "the linked file is an open document's file");
let href = linked.to_string_lossy().replace('\\', "/");
let href = linked.to_string_lossy().replace('\\', "/").replace('&', "&amp;").replace('<', "&lt;").replace('\'', "&apos;");
std::fs::write(
dir.join("page.svg"),
format!("<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='50' height='50'><image x='0' y='0' width='10' height='10' xlink:href='{href}'/></svg>"),
@@ -343,6 +369,38 @@ fn an_svg_export_writes_nothing_when_one_of_its_files_is_refused() {
let _ = std::fs::remove_dir_all(base);
}
/// An export does not write a file it writes besides the one named, here an SVG's image, while a
/// `File` object holds it open for writing, and so writes nothing.
#[test]
fn an_svg_export_does_not_write_an_image_a_file_holds_open() {
let base = folder("svgheld");
let mut s = session(&base);
let dir = data_folder(&mut s, &base);
let pic = base.join("outside/pic.png");
std::fs::write(&pic, super::links::png(2, 2, [10, 200, 30])).unwrap();
s.execute("file.new", &json!({"width": 100, "height": 100})).unwrap();
s.execute("file.place", &json!({"path": pic.to_string_lossy(), "link": false})).unwrap();
let svg = dir.join("a.svg");
let export = format!("app.activeDocument.exportFile(new File({}), ExportType.SVG, new ExportOptionsSVG());", quoted(&svg));
logged(&mut s, &base, &format!("Folder.userData; {export}"));
let mut images: Vec<PathBuf> = std::fs::read_dir(&dir).unwrap().map(|e| e.unwrap().path()).filter(|p| *p != svg).collect();
assert_eq!(images.len(), 1, "the embedded image is written beside the SVG: {images:?}");
let image = images.remove(0);
std::fs::remove_file(&svg).unwrap();
let log = logged(
&mut s,
&base,
&format!(
"Folder.userData; var w = new File({}); w.open('w'); w.write('pending');\ntry {{ {export} vc.log('ran'); }} catch (e) {{ vc.log(e.message); }}",
quoted(&image)
),
);
assert!(log[0].as_str().unwrap().contains(DENIED), "{log}");
assert!(!svg.exists(), "the SVG is not written when its image may not be");
assert_eq!(std::fs::read_to_string(&image).unwrap(), "pending", "the File's own bytes");
let _ = std::fs::remove_dir_all(base);
}
/// A link inside a granted folder that leads out of it is followed and refused.
#[cfg(unix)]
#[test]
@@ -404,6 +462,12 @@ fn bad_arguments_are_refused_with_an_error() {
),
"at most",
),
(
format!(
"var p = new ExportOptionsPNG24(); p.horizontalScale = p.verticalScale = 0.5; app.activeDocument.exportFile({f}, ExportType.PNG24, p);"
),
"at least 1",
),
(
format!("var p = new ExportOptionsPNG24(); p.horizontalScale = 50; app.activeDocument.exportFile({f}, ExportType.PNG24, p);"),
"not available yet",
@@ -37,12 +37,14 @@ const OUTSIDE: &[(&str, &str, &str)] = &[
("Folder.prototype.remove", "var d = new Folder(p); d.remove();", "filesWritten"),
("Folder.prototype.rename", "var d = new Folder(p); d.rename(q);", "filesWritten"),
("Folder.prototype.execute", "var d = new Folder(p); d.execute();", "filesOpened"),
("Document.prototype.saveAs", "app.activeDocument.saveAs(f);", "filesWritten"),
("Document.prototype.exportFile", "app.activeDocument.exportFile(f, ExportType.PNG24);", "filesWritten"),
];
/// The names the host adds that stay inside the document and the run, by the object that has them.
/// Reading a file or a folder, a file dialog and a message to the person do not change anything
/// outside it. The document model (`app`, its classes and the enumerations) acts on the open
/// documents; `Document.saveAs` and `close` throw "not available yet".
/// documents; `Document.close` throws "not available yet". `app.open` reads the file it is given.
const INSIDE: &[(&str, &str)] = &[
("", "$ File Folder alert confirm localize prompt toSource"),
("Object.prototype.", "toSource"),
@@ -81,7 +83,7 @@ const INSIDE: &[(&str, &str)] = &[
(
"Application.prototype.",
"activeDocument activeDocument= beep beep= constructor coordinateSystem coordinateSystem= documents getIsFileOpen \
selection typename",
open selection typename userInteractionLevel userInteractionLevel=",
),
("Documents.", "prototype"),
("Documents.prototype.", "add addDocument constructor getByName index length parent typename"),
@@ -90,7 +92,7 @@ const INSIDE: &[(&str, &str)] = &[
"Document.prototype.",
"activeLayer activeLayer= artboards artboards= close close= constructor convertCoordinate documentColorSpace \
groupItems groupItems= height layers layers= name pageItems parent pathItems pathItems= rulerOrigin rulerOrigin= \
rulerUnits saveAs saveAs= selection selection= swatches swatches= symbols symbols= textFrames textFrames= typename \
rulerUnits selection selection= swatches swatches= symbols symbols= textFrames textFrames= typename \
views views= width",
),
("Layer.", "prototype"),
@@ -121,12 +123,27 @@ const INSIDE: &[(&str, &str)] = &[
("ElementPlacement.", "INSIDE PLACEAFTER PLACEATBEGINNING PLACEATEND PLACEBEFORE"),
("RulerUnits.", "Centimeters Inches Millimeters Picas Pixels Points Qs Unknown"),
("ZOrderMethod.", "BRINGFORWARD BRINGTOFRONT SENDBACKWARD SENDTOBACK"),
// The enumerations of saving, exporting and opening.
("", "Compatibility EPSPostScriptLevelEnum EPSPreview ExportType PDFBoxType PDFCompatibility PDFOverprint UserInteractionLevel"),
(
"Compatibility.",
"ILLUSTRATOR10 ILLUSTRATOR11 ILLUSTRATOR12 ILLUSTRATOR13 ILLUSTRATOR14 ILLUSTRATOR15 ILLUSTRATOR16 ILLUSTRATOR17 \
ILLUSTRATOR19 ILLUSTRATOR8 ILLUSTRATOR9 JAPANESEVERSION3",
),
("EPSPostScriptLevelEnum.", "LEVEL2 LEVEL3"),
("EPSPreview.", "BWTIFF COLORTIFF None TRANSPARENTCOLORTIFF"),
("ExportType.", "AutoCAD FLASH GIF JPEG PNG24 PNG8 SVG TIFF"),
("PDFBoxType.", "PDFARTBOX PDFBLEEDBOX PDFBOUNDINGBOX PDFCROPBOX PDFMEDIABOX PDFTRIMBOX"),
("PDFCompatibility.", "ACROBAT4 ACROBAT5 ACROBAT6 ACROBAT7 ACROBAT8"),
("PDFOverprint.", "DISCARDPDFOVERPRINT PRESERVEPDFOVERPRINT"),
("UserInteractionLevel.", "DISPLAYALERTS DONTDISPLAYALERTS"),
];
/// The classes the host adds with nothing but a prototype and its constructor: `DocumentPreset`
/// and the page item types.
/// The classes the host adds with nothing but a prototype and its constructor: `DocumentPreset`,
/// the page item types and the save and export option classes.
const BARE_CLASSES: &str = "BlendItem CompoundPathItem DocumentPreset EnvelopeItem GraphItem GroupItem IntertwineItem MeshItem PathItem \
PlacedDocumentItem PlacedItem RasterItem RepeatItem SymbolItem TextFrame";
PlacedDocumentItem PlacedItem RasterItem RepeatItem SymbolItem TextFrame EPSSaveOptions ExportOptionsJPEG ExportOptionsPNG24 \
ExportOptionsSVG IllustratorSaveOptions PDFSaveOptions";
/// The name the checker does not read, which also stands for its members: `vc` is VectorCraft's
/// own API, and what `vc.run` does depends on the command it runs.
+11 -1
View File
@@ -287,6 +287,16 @@ impl<'s, 'a, 'l> Analyzer<'s, 'a, 'l> {
/// `(` after a name: a call.
fn call(&mut self, line: Option<usize>) {
let [h0, h1, h2, h3] = self.h;
// `doc['saveAs'](f)`: a document method named by a string literal in brackets.
if is(h0, "]")
&& is(h2, "[")
&& let Some(name) = h1.filter(|s| s.kind == T::Str)
&& catalog::DOM_FILE_WRITES.contains(&unquote(name.text, 32).as_str())
{
self.acc.feature(FeatureId::FileWrite, line);
self.acc.outside(OutsideId::FilesWritten, line, None);
return;
}
let Some(callee) = h0.filter(|s| s.kind == T::Ident) else { return };
let n = callee.text;
if is(h1, ".") {
@@ -301,7 +311,7 @@ impl<'s, 'a, 'l> Analyzer<'s, 'a, 'l> {
self.acc.feature(FeatureId::FileDialog, line);
} else if catalog::FOLDER_READS.contains(&n) || (file && catalog::FILE_READS.contains(&n)) {
self.acc.feature(FeatureId::FileRead, line);
} else if file && catalog::FILE_WRITES.contains(&n) {
} else if (file && catalog::FILE_WRITES.contains(&n)) || catalog::DOM_FILE_WRITES.contains(&n) {
self.acc.feature(FeatureId::FileWrite, line);
self.acc.outside(OutsideId::FilesWritten, line, None);
} else if n == catalog::EXECUTE {
+3
View File
@@ -72,6 +72,9 @@ pub(crate) const REFLECT: &str = "reflect";
// The roots of the document model: https://ai-scripting.docsforadobe.dev/jsobjref/Application/
pub(crate) const DOM_ROOTS: [&str; 4] = ["app", "activeDocument", "documents", "selection"];
// Document methods that write the file they are given: https://ai-scripting.docsforadobe.dev/jsobjref/Document/
pub(crate) const DOM_FILE_WRITES: &[&str] = &["exportFile", "saveAs"];
// Application methods that page doesn't list, named in public forum posts:
// https://community.adobe.com/t5/illustrator-discussions/changes-in-cs6/td-p/4173362 (executeMenuCommand,
// doScript, loadAction, unloadAction) and
+28
View File
@@ -530,6 +530,34 @@ fn the_scripts_own_platform_names_are_not_the_platforms() {
assert_eq!(r.outside.iter().map(|o| o.id).collect::<Vec<_>>(), ["filesWritten"]);
}
/// A document's `saveAs` and `exportFile` write the file they are given; `app.open` only reads one.
#[test]
fn save_as_and_export_file_write_a_file() {
let r = report(concat!(
"var f = new File(p);\n",
"var d = app.open(f);\n",
"d.saveAs(f);\n",
"app.activeDocument.exportFile(f, ExportType.PNG24);\n",
));
assert_eq!(feature(&r, "file.write").map(|f| f.lines.as_slice()), Some(&[3, 4][..]));
assert_eq!(r.outside.iter().map(|o| (o.id, o.lines.as_slice())).collect::<Vec<_>>(), [("filesWritten", &[3, 4][..])]);
}
/// `saveAs` and `exportFile` called with their names as string literals in brackets write the file
/// too; reading the method without calling it does not.
#[test]
fn save_as_and_export_file_in_brackets_write_a_file() {
let r = report(concat!(
"var f = new File(p);\n",
"app.activeDocument['open'](f);\n",
"app.activeDocument[\"saveAs\"](f);\n",
"var d = app.activeDocument; d['exportFile'] (f, ExportType.SVG);\n",
"var n = d['saveAs'];\n",
));
assert_eq!(feature(&r, "file.write").map(|f| f.lines.as_slice()), Some(&[3, 4][..]));
assert_eq!(r.outside.iter().map(|o| (o.id, o.lines.as_slice())).collect::<Vec<_>>(), [("filesWritten", &[3, 4][..])]);
}
/// Setting a File object's length, hidden or read-only flag changes the file; reading them, comparing
/// them and setting them on another object does not.
#[test]
+1
View File
@@ -6608,6 +6608,7 @@ liquify-list-end {0}, {1} {0} i {1}
@msg Script file dialogs need a person to answer them Els diàlegs de fitxers de l’script necessiten una persona que els respongui
@msg Script file is not open for writing El fitxer de l’script no està obert per escriure-hi
@msg Script file is read-only El fitxer de l’script és només de lectura
@msg Script file is open for writing El fitxer de l’script està obert per escriure-hi
@msg Script file name is already in use El nom del fitxer de l’script ja està en ús
@msg Script file name must be a name without a folder El nom del fitxer de l’script ha de ser un nom sense carpeta
@msg Script file permission can be kept only for a script run from a file El permís de fitxers només es pot conservar per a un script executat des d’un fitxer
Can't render this file because it is too large.
+1
View File
@@ -5393,6 +5393,7 @@ liquify-list-end {0}, {1} {0} a {1}
@msg Script file dialogs need a person to answer them Dialogy souborů skriptu potřebují osobu, která na ně odpoví
@msg Script file is not open for writing Soubor skriptu není otevřený pro zápis
@msg Script file is read-only Soubor skriptu je jen pro čtení
@msg Script file is open for writing Soubor skriptu je otevřený pro zápis
@msg Script file name is already in use Název souboru skriptu se už používá
@msg Script file name must be a name without a folder Název souboru skriptu musí být název bez složky
@msg Script file permission can be kept only for a script run from a file Oprávnění k souborům lze zachovat jen pro skript spuštěný ze souboru
Can't render this file because it is too large.
+1
View File
@@ -88,6 +88,7 @@
@msg Script file dialogs need a person to answer them Scriptets fildialoger skal besvares af en person
@msg Script file is not open for writing Scriptfilen er ikke åben for skrivning
@msg Script file is read-only Scriptfilen er skrivebeskyttet
@msg Script file is open for writing Scriptfilen er åben for skrivning
@msg Script file name is already in use Scriptfilens navn er allerede i brug
@msg Script file name must be a name without a folder Scriptfilens navn skal være et navn uden en mappe
@msg Script file permission can be kept only for a script run from a file Filtilladelsen kan kun beholdes for et script, der køres fra en fil
Can't render this file because it is too large.
+1
View File
@@ -4969,6 +4969,7 @@ liquify-list-end {0}, {1} {0} und {1}
@msg Script file dialogs need a person to answer them Dateidialoge von Skripten brauchen eine Person, die sie beantwortet
@msg Script file is not open for writing Skriptdatei ist nicht zum Schreiben geöffnet
@msg Script file is read-only Skriptdatei ist schreibgeschützt
@msg Script file is open for writing Skriptdatei ist zum Schreiben geöffnet
@msg Script file name is already in use Name der Skriptdatei wird bereits verwendet
@msg Script file name must be a name without a folder Name der Skriptdatei muss ein Name ohne Ordner sein
@msg Script file permission can be kept only for a script run from a file Dateiberechtigung kann nur für ein Skript behalten werden, das aus einer Datei ausgeführt wird
Can't render this file because it is too large.
+1
View File
@@ -2806,6 +2806,7 @@ liquify-list-end {0}, {1} {0} και {1}
@msg Script file dialogs need a person to answer them Τα παράθυρα διαλόγου αρχείων του σεναρίου χρειάζονται ένα άτομο για να απαντήσει
@msg Script file is not open for writing Το αρχείο του σεναρίου δεν είναι ανοιχτό για εγγραφή
@msg Script file is read-only Το αρχείο του σεναρίου είναι μόνο για ανάγνωση
@msg Script file is open for writing Το αρχείο του σεναρίου είναι ανοιχτό για εγγραφή
@msg Script file name is already in use Το όνομα του αρχείου του σεναρίου χρησιμοποιείται ήδη
@msg Script file name must be a name without a folder Το όνομα του αρχείου του σεναρίου πρέπει να είναι όνομα χωρίς φάκελο
@msg Script file permission can be kept only for a script run from a file Η άδεια αρχείων μπορεί να διατηρηθεί μόνο για σενάριο που εκτελείται από αρχείο
Can't render this file because it is too large.
+1
View File
@@ -5080,6 +5080,7 @@ liquify-list-end {0}, {1} {0}, {1}
@msg Script file dialogs need a person to answer them Los cuadros de diálogo de archivo del script necesitan que una persona los responda
@msg Script file is not open for writing El archivo del script no está abierto para escritura
@msg Script file is read-only El archivo del script es de solo lectura
@msg Script file is open for writing El archivo del script está abierto para escritura
@msg Script file name is already in use El nombre del archivo del script ya está en uso
@msg Script file name must be a name without a folder El nombre del archivo del script debe ser un nombre sin carpeta
@msg Script file permission can be kept only for a script run from a file El permiso de archivos solo se puede conservar para un script ejecutado desde un archivo
Can't render this file because it is too large.
+1
View File
@@ -5321,6 +5321,7 @@ liquify-list-end {0}, {1} {0} ja {1}
@msg Script file dialogs need a person to answer them Komentosarjan tiedostovalintaikkunoihin tarvitaan vastaava henkilö
@msg Script file is not open for writing Komentosarjan tiedosto ei ole auki kirjoittamista varten
@msg Script file is read-only Komentosarjan tiedosto on vain luku -tilassa
@msg Script file is open for writing Komentosarjan tiedosto on auki kirjoittamista varten
@msg Script file name is already in use Komentosarjan tiedoston nimi on jo käytössä
@msg Script file name must be a name without a folder Komentosarjan tiedoston nimen on oltava nimi ilman kansiota
@msg Script file permission can be kept only for a script run from a file Tiedostolupa voidaan säilyttää vain tiedostosta suoritetulle komentosarjalle
Can't render this file because it is too large.
+1
View File
@@ -5039,6 +5039,7 @@ liquify-list-end {0}, {1} {0} et {1}
@msg Script file dialogs need a person to answer them Les boîtes de dialogue de fichiers du script ont besoin d’une personne pour y répondre
@msg Script file is not open for writing Le fichier du script n’est pas ouvert en écriture
@msg Script file is read-only Le fichier du script est en lecture seule
@msg Script file is open for writing Le fichier du script est ouvert en écriture
@msg Script file name is already in use Le nom du fichier du script est déjà utilisé
@msg Script file name must be a name without a folder Le nom du fichier du script doit être un nom sans dossier
@msg Script file permission can be kept only for a script run from a file L’autorisation d’accès aux fichiers ne peut être conservée que pour un script exécuté depuis un fichier
Can't render this file because it is too large.
+1
View File
@@ -7755,6 +7755,7 @@ liquify-list-end {0}, {1} {0} और {1}
@msg Script file dialogs need a person to answer them स्क्रिप्ट के फ़ाइल डायलॉग को उत्तर देने के लिए किसी व्यक्ति की ज़रूरत है
@msg Script file is not open for writing स्क्रिप्ट फ़ाइल लिखने के लिए खुली नहीं है
@msg Script file is read-only स्क्रिप्ट फ़ाइल केवल पढ़ने के लिए है
@msg Script file is open for writing स्क्रिप्ट फ़ाइल लिखने के लिए खुली है
@msg Script file name is already in use स्क्रिप्ट फ़ाइल का नाम पहले से उपयोग में है
@msg Script file name must be a name without a folder स्क्रिप्ट फ़ाइल का नाम बिना फ़ोल्डर वाला नाम होना चाहिए
@msg Script file permission can be kept only for a script run from a file फ़ाइल अनुमति केवल फ़ाइल से चलाई गई स्क्रिप्ट के लिए रखी जा सकती है
Can't render this file because it is too large.
+1
View File
@@ -5911,6 +5911,7 @@ liquify-list-end {0}, {1} {0} és {1}
@msg Script file dialogs need a person to answer them A parancsfájl fájlpárbeszédpaneleire egy személynek kell válaszolnia
@msg Script file is not open for writing A parancsfájl fájlja nincs írásra megnyitva
@msg Script file is read-only A parancsfájl fájlja csak olvasható
@msg Script file is open for writing A parancsfájl fájlja írásra meg van nyitva
@msg Script file name is already in use A parancsfájl fájljának neve már használatban van
@msg Script file name must be a name without a folder A parancsfájl fájljának neve mappa nélküli név kell legyen
@msg Script file permission can be kept only for a script run from a file A fájlengedély csak fájlból futtatott parancsfájlnál tartható meg
Can't render this file because it is too large.
+1
View File
@@ -8749,6 +8749,7 @@ breakText Glyphs Glif
@msg Script file dialogs need a person to answer them Dialog file skrip memerlukan orang untuk menjawabnya
@msg Script file is not open for writing File skrip tidak dibuka untuk ditulis
@msg Script file is read-only File skrip hanya dapat dibaca
@msg Script file is open for writing File skrip sedang dibuka untuk ditulis
@msg Script file name is already in use Nama file skrip sudah digunakan
@msg Script file name must be a name without a folder Nama file skrip harus berupa nama tanpa folder
@msg Script file permission can be kept only for a script run from a file Izin file skrip hanya dapat disimpan untuk skrip yang dijalankan dari file
Can't render this file because it is too large.
+1
View File
@@ -5107,6 +5107,7 @@ liquify-list-end {0}, {1} {0} e {1}
@msg Script file dialogs need a person to answer them Le finestre di dialogo dei file dello script richiedono una persona che risponda
@msg Script file is not open for writing Il file dello script non è aperto in scrittura
@msg Script file is read-only Il file dello script è di sola lettura
@msg Script file is open for writing Il file dello script è aperto in scrittura
@msg Script file name is already in use Il nome del file dello script è già in uso
@msg Script file name must be a name without a folder Il nome del file dello script deve essere un nome senza cartella
@msg Script file permission can be kept only for a script run from a file Il permesso sui file può essere mantenuto solo per uno script eseguito da un file
Can't render this file because it is too large.
+1
View File
@@ -5942,6 +5942,7 @@ liquify-list-end {0}, {1} {0}、{1}
@msg Script file dialogs need a person to answer them スクリプトのファイルダイアログには応答する人が必要です
@msg Script file is not open for writing スクリプトのファイルが書き込み用に開かれていません
@msg Script file is read-only スクリプトのファイルは読み取り専用です
@msg Script file is open for writing スクリプトのファイルが書き込み用に開かれています
@msg Script file name is already in use スクリプトのファイル名はすでに使用されています
@msg Script file name must be a name without a folder スクリプトのファイル名はフォルダーを含まない名前にしてください
@msg Script file permission can be kept only for a script run from a file ファイルの許可を保持できるのは、ファイルから実行したスクリプトだけです
Can't render this file because it is too large.
+1
View File
@@ -8603,6 +8603,7 @@ liquify-list-end {0}, {1} {0} და {1}
@msg Script file dialogs need a person to answer them სკრიპტის ფაილის დიალოგებს სჭირდება ადამიანი, რომელიც უპასუხებს
@msg Script file is not open for writing სკრიპტის ფაილი ჩასაწერად გახსნილი არ არის
@msg Script file is read-only სკრიპტის ფაილი მხოლოდ წასაკითხია
@msg Script file is open for writing სკრიპტის ფაილი ჩასაწერად გახსნილია
@msg Script file name is already in use სკრიპტის ფაილის სახელი უკვე გამოიყენება
@msg Script file name must be a name without a folder სკრიპტის ფაილის სახელი უნდა იყოს სახელი საქაღალდის გარეშე
@msg Script file permission can be kept only for a script run from a file ფაილების ნებართვის შენახვა შესაძლებელია მხოლოდ ფაილიდან გაშვებული სკრიპტისთვის
Can't render this file because it is too large.
+1
View File
@@ -5871,6 +5871,7 @@ liquify-list-end {0}, {1} {0} 및 {1}
@msg Script file dialogs need a person to answer them 스크립트 파일 대화 상자에는 응답할 사람이 필요합니다
@msg Script file is not open for writing 스크립트 파일이 쓰기용으로 열려 있지 않습니다
@msg Script file is read-only 스크립트 파일이 읽기 전용입니다
@msg Script file is open for writing 스크립트 파일이 쓰기용으로 열려 있습니다
@msg Script file name is already in use 스크립트 파일 이름이 이미 사용 중입니다
@msg Script file name must be a name without a folder 스크립트 파일 이름은 폴더 없는 이름이어야 합니다
@msg Script file permission can be kept only for a script run from a file 파일 권한은 파일에서 실행한 스크립트에만 유지할 수 있습니다
Can't render this file because it is too large.
+1
View File
@@ -90,6 +90,7 @@
@msg Script file dialogs need a person to answer them Dialoogvensters voor scriptbestanden moeten door een persoon worden beantwoord
@msg Script file is not open for writing Het scriptbestand is niet geopend voor schrijven
@msg Script file is read-only Het scriptbestand is alleen-lezen
@msg Script file is open for writing Het scriptbestand is geopend voor schrijven
@msg Script file name is already in use De naam van het scriptbestand is al in gebruik
@msg Script file name must be a name without a folder De naam van het scriptbestand moet een naam zonder map zijn
@msg Script file permission can be kept only for a script run from a file Toestemming voor scriptbestanden kan alleen worden bewaard voor een script dat vanuit een bestand wordt uitgevoerd
Can't render this file because it is too large.
+1
View File
@@ -5212,6 +5212,7 @@ liquify-list-end {0}, {1} {0} i {1}
@msg Script file dialogs need a person to answer them Okna dialogowe plików skryptu wymagają osoby, która na nie odpowie
@msg Script file is not open for writing Plik skryptu nie jest otwarty do zapisu
@msg Script file is read-only Plik skryptu jest tylko do odczytu
@msg Script file is open for writing Plik skryptu jest otwarty do zapisu
@msg Script file name is already in use Nazwa pliku skryptu jest już używana
@msg Script file name must be a name without a folder Nazwa pliku skryptu musi być nazwą bez folderu
@msg Script file permission can be kept only for a script run from a file Uprawnienie do plików można zachować tylko dla skryptu uruchomionego z pliku
Can't render this file because it is too large.
+1
View File
@@ -6251,6 +6251,7 @@ liquify-list-end {0}, {1} {0} e {1}
@msg Script file dialogs need a person to answer them As caixas de diálogo de arquivo do script precisam de uma pessoa para respondê-las
@msg Script file is not open for writing O arquivo do script não está aberto para gravação
@msg Script file is read-only O arquivo do script é somente leitura
@msg Script file is open for writing O arquivo do script está aberto para gravação
@msg Script file name is already in use O nome do arquivo do script já está em uso
@msg Script file name must be a name without a folder O nome do arquivo do script deve ser um nome sem pasta
@msg Script file permission can be kept only for a script run from a file A permissão de arquivos só pode ser mantida para um script executado a partir de um arquivo
Can't render this file because it is too large.
+1
View File
@@ -5102,6 +5102,7 @@ liquify-list-end {0}, {1} {0} и {1}
@msg Script file dialogs need a person to answer them Для ответа на файловые диалоги скрипта нужен человек
@msg Script file is not open for writing Файл скрипта не открыт для записи
@msg Script file is read-only Файл скрипта доступен только для чтения
@msg Script file is open for writing Файл скрипта открыт для записи
@msg Script file name is already in use Имя файла скрипта уже используется
@msg Script file name must be a name without a folder Имя файла скрипта должно быть именем без папки
@msg Script file permission can be kept only for a script run from a file Разрешение на файлы можно сохранить только для скрипта, запущенного из файла
Can't render this file because it is too large.
+1
View File
@@ -4978,6 +4978,7 @@ liquify-list-end {0}, {1} {0} och {1}
@msg Script file dialogs need a person to answer them Skriptets fildialoger behöver en person som svarar på dem
@msg Script file is not open for writing Skriptets fil är inte öppen för skrivning
@msg Script file is read-only Skriptets fil är skrivskyddad
@msg Script file is open for writing Skriptets fil är öppen för skrivning
@msg Script file name is already in use Namnet på skriptets fil används redan
@msg Script file name must be a name without a folder Namnet på skriptets fil måste vara ett namn utan mapp
@msg Script file permission can be kept only for a script run from a file Filbehörighet kan bara behållas för ett skript som körs från en fil
Can't render this file because it is too large.
+1
View File
@@ -4814,6 +4814,7 @@ liquify-list-end {0}, {1} {0} ve {1}
@msg Script file dialogs need a person to answer them Betiğin dosya iletişim kutularının yanıtlanması için bir kişi gerekir
@msg Script file is not open for writing Betiğin dosyası yazmak için açık değil
@msg Script file is read-only Betiğin dosyası salt okunur
@msg Script file is open for writing Betiğin dosyası yazmak için açık
@msg Script file name is already in use Betiğin dosya adı zaten kullanılıyor
@msg Script file name must be a name without a folder Betiğin dosya adı klasör içermeyen bir ad olmalıdır
@msg Script file permission can be kept only for a script run from a file Dosya izni yalnızca bir dosyadan çalıştırılan betik için saklanabilir
Can't render this file because it is too large.
+1
View File
@@ -5091,6 +5091,7 @@ liquify-list-end {0}, {1} {0} і {1}
@msg Script file dialogs need a person to answer them Для відповіді на файлові діалоги скрипту потрібна людина
@msg Script file is not open for writing Файл скрипту не відкрито для запису
@msg Script file is read-only Файл скрипту доступний лише для читання
@msg Script file is open for writing Файл скрипту відкрито для запису
@msg Script file name is already in use Ім’я файлу скрипту вже використовується
@msg Script file name must be a name without a folder Ім’я файлу скрипту має бути іменем без папки
@msg Script file permission can be kept only for a script run from a file Дозвіл на файли можна зберегти лише для скрипту, запущеного з файлу
Can't render this file because it is too large.
+1
View File
@@ -5601,6 +5601,7 @@ liquify-list-end {0}, {1} {0} và {1}
@msg Script file dialogs need a person to answer them Hộp thoại tệp của tập lệnh cần một người trả lời
@msg Script file is not open for writing Tệp của tập lệnh chưa được mở để ghi
@msg Script file is read-only Tệp của tập lệnh ở chế độ chỉ đọc
@msg Script file is open for writing Tệp của tập lệnh đang được mở để ghi
@msg Script file name is already in use Tên tệp của tập lệnh đã được sử dụng
@msg Script file name must be a name without a folder Tên tệp của tập lệnh phải là một tên không có thư mục
@msg Script file permission can be kept only for a script run from a file Chỉ có thể giữ quyền truy cập tệp cho tập lệnh chạy từ một tệp
Can't render this file because it is too large.
+1
View File
@@ -5598,6 +5598,7 @@ liquify-list-end {0}, {1} {0}和{1}
@msg Script file dialogs need a person to answer them 脚本的文件对话框需要有人回答
@msg Script file is not open for writing 脚本的文件未以写入方式打开
@msg Script file is read-only 脚本的文件为只读
@msg Script file is open for writing 脚本的文件已以写入方式打开
@msg Script file name is already in use 脚本的文件名已被使用
@msg Script file name must be a name without a folder 脚本的文件名必须是不含文件夹的名称
@msg Script file permission can be kept only for a script run from a file 只有从文件运行的脚本才能保留文件权限
Can't render this file because it is too large.
+1
View File
@@ -2953,6 +2953,7 @@ liquify-list-end {0}, {1} {0}和{1}
@msg Script file dialogs need a person to answer them 指令碼的檔案對話框需要有人回應
@msg Script file is not open for writing 指令碼的檔案未以寫入方式開啟
@msg Script file is read-only 指令碼的檔案為唯讀
@msg Script file is open for writing 指令碼的檔案已以寫入方式開啟
@msg Script file name is already in use 指令碼的檔案名稱已在使用中
@msg Script file name must be a name without a folder 指令碼的檔案名稱必須是不含資料夾的名稱
@msg Script file permission can be kept only for a script run from a file 只有從檔案執行的指令碼才能保留檔案權限
Can't render this file because it is too large.
+7 -4
View File
@@ -2558,7 +2558,8 @@ 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`,
File object's `length`, `hidden` or `readonly` counts too, and so does a document's `saveAs` or `exportFile`),
`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,
@@ -2695,8 +2696,8 @@ app through the global object `vc`, and writes to the Script Console and runs ot
`exportType` is an `ExportType`: `PNG24`, `JPEG` and `SVG` take `new ExportOptionsPNG24()`, `new ExportOptionsJPEG()`
and `new ExportOptionsSVG()` (https://ai-scripting.docsforadobe.dev/jsobjref/ExportOptionsPNG24/,
https://ai-scripting.docsforadobe.dev/jsobjref/ExportOptionsJPEG/, https://ai-scripting.docsforadobe.dev/jsobjref/ExportOptionsSVG/),
with `antiAliasing`, `artBoardClipping`, `horizontalScale` and `verticalScale` (the same value, more than 0 and at
most 776.19; 100 writes one pixel per point whatever the raster effects resolution), `transparency` (PNG24), `qualitySetting` (0 to 100) and `optimization` (JPEG), and
with `antiAliasing`, `artBoardClipping`, `horizontalScale` and `verticalScale` (the same value, from 1 to
776.19; 100 writes one pixel per point whatever the raster effects resolution), `transparency` (PNG24), `qualitySetting` (0 to 100) and `optimization` (JPEG), and
`coordinatePrecision` (1 to 7), `embedRasterImages`, `compressed`, `preserveEditability` and
`includeVariablesAndDatasets` (SVG); `PNG8`, `GIF` and `TIFF` take no options. `app.open`'s
`options` is a `PDFFileOptions` record (https://ai-scripting.docsforadobe.dev/jsobjref/PDFFileOptions/) with
@@ -2706,7 +2707,9 @@ app through the global object `vc`, and writes to the Script Console and runs ot
VectorCraft's own rules: each path is checked as a `File` opened for reading or writing is checked, before the
command runs. A path outside the script's folders throws `Script file access denied`, also when it is an open
document's file, a link that leads outside them, or the settings folder; a read-only file throws `Script file is
read-only`; and the files a command reads or writes besides the one named, such as an SVG's linked files, are
read-only`; a file a `File` object holds open for writing throws `Script file is open for writing` on `saveAs`
and `exportFile`, and `Script file access denied` when a command would write it besides the file named; and the
files a command reads or writes besides the one named, such as an SVG's linked files, are
read and written only where the script's folders allow. `userInteractionLevel` does not change what a command
does or where it may read and write, since a command a script runs never shows a dialog. `exportFile` adds the
format's extension unless the name already ends with it (`.jpg` or `.jpeg`, `.tif` or `.tiff`, `.svgz` with