Scripts: saveAs logs the save's warnings; exact grants cover linked files; a tracing's source stays first

- Document.saveAs writes each warning file.saveAs gives to the console as a
  line that starts with "saveAs: ", and still returns undefined.
- A save, export or open of a File the script names no longer reads a file
  an open document links to outside the script's grants.
- A save or export that writes several files checks that no folder is where
  one of them goes before it writes the first, so none of them is written.
- Moving the source image of a tracing within its tracing, and zOrder on it,
  leave it first; zOrder SENDTOBACK on another object in a tracing puts it
  just above the source.
- The two new script file errors are English only; their catalog rows are
  removed (translations go through storytold/craft-i18n).
This commit is contained in:
dotCooCoo committed 2026-11-29 15:49:36 -08:00
1 parent 94a6d6ccf7
commit 64972e8a91
35 files changed
+161 -70

No files matched your search

+11
View File
@@ -267,6 +267,17 @@ pub(crate) fn may_write(path: &str) -> Result<()> {
crate::file_access::check_write(path).map_err(EngineError::Other)
}
/// [`may_write`], and an error when something other than a regular file is at `path` (a folder):
/// the check each file of a set gets before the first of them is written.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) fn may_write_file(path: &str) -> Result<()> {
may_write(path)?;
match std::fs::metadata(path) {
Ok(m) if !m.is_file() => Err(EngineError::Other(format!("{path}: not a file"))),
_ => Ok(()),
}
}
#[cfg(not(target_arch = "wasm32"))]
pub(crate) fn read_file(path: &str) -> Result<Vec<u8>> {
may_read(path)?;
+1 -1
View File
@@ -87,7 +87,7 @@ pub(super) fn write_encoded(path: Option<&str>, name: &str, doc: &vectorcraft_do
#[cfg(not(target_arch = "wasm32"))]
if files.len() > 1 {
for (p, _) in &files {
super::may_write(p)?;
super::access::may_write_file(p)?;
}
}
for (p, bytes) in &files {
+1 -1
View File
@@ -1086,7 +1086,7 @@ impl SaveJob {
// job names refused files ([`SaveJob::naming_refused_files`]).
#[cfg(not(target_arch = "wasm32"))]
if files.len() > 1
&& let Some((p, refused)) = files.iter().find_map(|(p, _)| super::may_write(p).err().map(|e| (p, e)))
&& let Some((p, refused)) = files.iter().find_map(|(p, _)| super::access::may_write_file(p).err().map(|e| (p, e)))
{
return Err(if self.names_refused { super::access::naming_in_error(refused, p) } else { refused });
}
+29 -10
View File
@@ -2632,9 +2632,11 @@ fn place(h: &Host, doc: Doc, id: NodeId, to: &Destination) -> std::result::Resul
let from = d.position(id);
let count = d.children(Some(to.parent)).map_or(0, Vec::len) - usize::from(from.is_some_and(|(p, ..)| p == Some(to.parent)));
// A clip group's first child is its clipping path, and an Image Trace object's its source
// image: both stay first (the source image itself may go to the end of its own tracing).
let source = crate::cmd::is_trace_source(d, id) && d.parent_of(id) == Some(to.parent);
let clips = d.node(to.parent).is_some_and(|n| n.clips() || (crate::cmd::is_trace_group(n) && !source)) && count > 0;
// image: both stay first, and the source image moved within its own tracing stays where it is.
if crate::cmd::is_trace_source(d, id) && d.parent_of(id) == Some(to.parent) {
return Ok(0);
}
let clips = d.node(to.parent).is_some_and(|n| n.clips() || crate::cmd::is_trace_group(n)) && count > 0;
let at = match (to.how, to.beside) {
(Placement::Top, _) => count,
(Placement::Bottom, _) => 0,
@@ -2743,19 +2745,36 @@ fn item_z_order(h: &Host, a: &[Data]) -> Answer {
}
refuse_protected_edit(h, item)?;
selection_ids(h, item.doc, arg(a, 0))?;
let (before, after) = with_doc(h, item.doc, |_, st| {
let at = st.doc.position(item.id);
let count = at.and_then(|(p, ..)| st.doc.children(p).map(Vec::len)).unwrap_or(0);
(at.map(|(_, i, _)| i), count)
let (before, after, parent, source, in_trace) = with_doc(h, item.doc, |_, st| {
let d = &st.doc;
let at = d.position(item.id);
let count = at.and_then(|(p, ..)| d.children(p).map(Vec::len)).unwrap_or(0);
let parent = d.parent_of(item.id);
let in_trace = parent.and_then(|p| d.node(p)).is_some_and(crate::cmd::is_trace_group);
(at.map(|(_, i, _)| i), count, parent, crate::cmd::is_trace_source(d, item.id), in_trace)
});
let Some(i) = before else { return Err(HostError::Error(STALE_ITEM.into())) };
// The source image an Image Trace object keeps first stays first, and the other objects in it
// stay above it.
if source {
return Ok(Data::Undefined);
}
let bottom = usize::from(in_trace);
let top = i + 1 >= after;
let unchanged = match id {
"object.arrange.bringToFront" | "object.arrange.bringForward" => top,
_ => i == 0,
_ => i <= bottom,
};
if !unchanged {
edit_item(h, item, id, &json!({"ids": [item.id.0]}))?;
if unchanged {
return Ok(Data::Undefined);
}
match parent {
Some(p) if in_trace && id == "object.arrange.sendToBack" => {
edit_item(h, item, "node.move", &json!({"id": item.id.0, "parent": p.0, "index": bottom}))?;
}
_ => {
edit_item(h, item, id, &json!({"ids": [item.id.0]}))?;
}
}
Ok(Data::Undefined)
}
+8 -4
View File
@@ -42,8 +42,8 @@ use serde_json::{Map, Value, json};
use vectorcraft_js::{Data, HostClass, HostError, HostFunction};
use super::{
Answer, Described, Host, Link, MAX_TEXT_BYTES, NO_ACTIVE_DOCUMENT, arg, boolean, command, current, doc_ref, given, method, named, num, on_doc,
property, returns, text, this_doc, typed, whole,
Answer, Described, Host, Link, MAX_TEXT_BYTES, NO_ACTIVE_DOCUMENT, arg, boolean, command, command_value, current, doc_ref, given, method, named,
num, on_doc, property, returns, text, this_doc, typed, whole,
};
/// The most a scale factor of an export takes, in percent.
@@ -630,7 +630,7 @@ fn refused(message: &str, path: &str) -> HostError {
/// Runs `f` with the commands' reads and writes held to the script's own grants
/// ([`super::super::files::Disk::exact`]).
fn exactly(h: &Host, f: impl FnOnce() -> Answer) -> Answer {
fn exactly<T>(h: &Host, f: impl FnOnce() -> Result<T, HostError>) -> Result<T, HostError> {
h.disk.borrow_mut().exact = true;
let r = f();
h.disk.borrow_mut().exact = false;
@@ -668,7 +668,11 @@ fn doc_save_as(h: &Host, a: &[Data]) -> Answer {
}
let real = h.disk.borrow().save_target(path).map_err(|m| refused(m, path))?;
p.insert("path".into(), json!(plain(real)));
exactly(h, || on_doc(h, doc.uid, false, |h| command(h, "file.saveAs", &Value::Object(p))))?;
let (_, value) = exactly(h, || on_doc(h, doc.uid, false, |h| command_value(h, "file.saveAs", &Value::Object(p))))?;
// Each warning of the save (what the format leaves out) goes to the console.
for w in value.get("warnings").and_then(Value::as_array).into_iter().flatten().filter_map(Value::as_str) {
super::super::each_line(&format!("saveAs: {w}"), |line, cut| h.line(super::super::console::Entry::Log(line), cut));
}
Ok(Data::Undefined)
}
+3 -2
View File
@@ -475,8 +475,9 @@ impl Disk {
/// and the files it may only read because the documents open when the run began link to them,
/// `linked`.
pub(crate) fn gate(&self, documents: Vec<String>, linked: crate::file_access::LinkedFiles) -> 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 };
// A save, export or open of a `File` the script names reads and writes as its `File` would,
// without the files of open documents or the files they link to.
let (documents, linked) = if self.exact { (Vec::new(), crate::file_access::LinkedFiles::default()) } else { (documents, linked) };
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, linked, also: None }
}
+5 -1
View File
@@ -112,7 +112,11 @@ fn a_placed_items_add_result_is_stale_after_a_revert() {
s.execute("document.save", &json!({"path": base.join("main/saved.vectorcraft").to_string_lossy()})).unwrap();
let assign = format!("p.file = new File('{}')", js_path(&png));
for read in ["p.file", assign.as_str()] {
let e = failure(&mut s, &base, &format!("var d = app.activeDocument; d.pathItems.rectangle(0, 0, 10, 10); var p = d.placedItems.add(); vc.run('file.revert'); {read};"));
let e = failure(
&mut s,
&base,
&format!("var d = app.activeDocument; d.pathItems.rectangle(0, 0, 10, 10); var p = d.placedItems.add(); vc.run('file.revert'); {read};"),
);
assert!(e.contains("Stale page item"), "{read}: {e}");
}
assert!(images(&s).is_empty());
@@ -552,6 +552,32 @@ fn an_object_placed_at_the_end_of_a_tracing_stays_above_its_source() {
let _ = std::fs::remove_dir_all(base);
}
/// The source image stays a tracing's first child when it goes to the front of the tracing, and
/// when another object in the tracing is sent to the back or the source is brought to the front.
#[test]
fn reordering_inside_a_tracing_keeps_the_source_first() {
let base = folder("reorder");
let (mut s, _) = session(&base, false);
let png = base.join("main/disc.png");
s.execute("file.place", &json!({"path": png.to_string_lossy(), "link": false})).unwrap();
let out = log(
&mut s,
&base,
"var d = app.activeDocument, a = d.rasterItems[1]; a.name = 'src'; var p = a.trace(), r = d.rasterItems[0]; r.name = 'moved';\
r.move(p, ElementPlacement.PLACEATBEGINNING);\
var s = p.tracing.sourceArt; s.hidden = false; s.move(p, ElementPlacement.PLACEATBEGINNING); vc.log(p.isTracing);\
r.zOrder(ZOrderMethod.SENDTOBACK); vc.log(p.isTracing); r.zOrder(ZOrderMethod.SENDBACKWARD); vc.log(p.isTracing);\
s.zOrder(ZOrderMethod.BRINGTOFRONT); s.zOrder(ZOrderMethod.BRINGFORWARD); vc.log(p.isTracing); vc.log(p.tracing.sourceArt.name);",
);
assert_eq!(out, [json!(true), json!(true), json!(true), json!(true), json!("src")]);
let groups = traces(&s);
assert_eq!(groups.len(), 1);
let d = &s.active().unwrap().doc;
let names: Vec<Option<String>> = d.children(Some(groups[0])).unwrap().iter().map(|n| n.name.clone()).collect();
assert_eq!(names[..2], [Some("src".to_string()), Some("moved".to_string())], "the source stays first: {names:?}");
let _ = std::fs::remove_dir_all(base);
}
#[test]
fn trace_source_art_is_not_listed_with_the_images() {
let base = folder("lists");
@@ -93,6 +93,25 @@ fn save_as_export_file_and_open_write_and_read_where_the_script_may() {
let _ = std::fs::remove_dir_all(base);
}
/// The warnings of the save go to the console, and `saveAs` still returns nothing.
#[test]
fn save_as_logs_the_saves_warnings() {
let base = folder("warnings");
let mut s = session(&base);
let dir = data_folder(&mut s, &base);
let d = quoted(&dir);
let text = format!(
"Folder.userData; var d = app.documents.add(DocumentColorSpace.RGB, 200, 100);\n\
vc.log(String(d.saveAs(new File({d} + '/a.svg'))));"
);
let r = run(&mut s, &base, &text).unwrap_or_else(|e| panic!("{text}: {e}"));
assert_eq!(r["log"], json!(["undefined"]));
let lines = r["console"]["lines"].as_array().cloned().unwrap_or_default();
let warned = lines.iter().filter_map(Value::as_str).any(|l| l.starts_with("saveAs: ") && l.contains("keeps the artwork"));
assert!(warned, "{lines:?}");
let _ = std::fs::remove_dir_all(base);
}
/// Without options, a save or export writes what an untouched new options object of its class gives.
#[test]
fn omitted_options_are_a_new_options_objects_defaults() {
@@ -234,9 +253,37 @@ fn a_save_writes_nothing_when_one_of_its_files_is_refused() {
#[allow(clippy::permissions_set_readonly_false)]
perms.set_readonly(false);
std::fs::set_permissions(&board, perms).unwrap();
// A folder where an artboard's file goes writes none of them either.
std::fs::remove_file(&board).unwrap();
std::fs::create_dir(&board).unwrap();
let e = failure(&mut s, &base, &save);
assert!(e.contains("not a file"), "{e}");
assert!(!central.exists(), "the central file is not written when a folder is where an artboard's file goes");
let _ = std::fs::remove_dir_all(base);
}
/// An export that writes several files writes none of them when a folder is where one of them goes.
#[test]
fn an_export_writes_nothing_when_a_folder_is_where_one_of_its_files_goes() {
let dir = vectorcraft_testkit::TempDir::new("export-folder-target");
let mut s = Session::new();
s.execute("file.new", &json!({"width": 200, "height": 100, "artboards": 2})).unwrap();
s.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 50, "height": 20})).unwrap();
let path = dir.join("a.eps").to_string_lossy().into_owned();
let export = json!({"path": path, "format": "eps", "useArtboards": true});
let r = s.execute("document.export", &export).unwrap();
let files: Vec<PathBuf> =
r["files"].as_array().unwrap_or_else(|| panic!("several files: {r}")).iter().map(|f| PathBuf::from(f.as_str().unwrap())).collect();
assert!(files.len() > 1, "{r}");
for f in &files {
std::fs::remove_file(f).unwrap();
}
std::fs::create_dir(files.last().unwrap()).unwrap();
let e = s.execute("document.export", &export).unwrap_err().to_string();
assert!(e.contains("not a file"), "{e}");
assert!(files[..files.len() - 1].iter().all(|f| !f.exists()), "no file is written when a folder is where one goes");
}
/// Every path goes through the script's file grants, as a `File` opened for reading or writing.
#[test]
fn save_as_export_file_and_open_refuse_paths_outside_the_grants() {
@@ -368,6 +415,34 @@ fn open_reads_linked_files_only_where_the_script_may() {
let _ = std::fs::remove_dir_all(base);
}
/// A file an open document links to is read by `open` only where the script may read, too.
#[test]
fn open_reads_files_open_documents_link_to_only_where_the_script_may() {
let base = folder("linked-by-open");
let mut s = session(&base);
let dir = data_folder(&mut s, &base);
let pic = base.join("outside/linked.png");
std::fs::write(&pic, super::links::png(2, 2, [10, 200, 30])).unwrap();
s.execute("file.new", &json!({})).unwrap();
s.execute("file.place", &json!({"path": pic.to_string_lossy(), "link": true})).unwrap();
let href = pic.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>"),
)
.unwrap();
logged(&mut s, &base, &format!("Folder.userData; app.open(new File({}));", quoted(&dir.join("page.svg"))));
let mut sizes = vec![];
s.active().unwrap().doc.walk(|n| {
if let NodeKind::Image(im) = &n.kind {
sizes.push((im.width, im.height));
}
});
assert_eq!(sizes.len(), 1, "{sizes:?}");
assert_ne!(sizes[0], (2, 2), "the linked file outside the script's folders is not read");
let _ = std::fs::remove_dir_all(base);
}
/// An SVG export with `embedRasterImages` false writes the document's embedded image beside the
/// SVG, and when that file may not be written, the SVG is not written either.
#[test]
-2
View File
@@ -6648,8 +6648,6 @@ liquify-list-end {0}, {1} {0} i {1}
@msg Script file could not be written No s’ha pogut escriure el fitxer de l’script
@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.
-2
View File
@@ -5430,8 +5430,6 @@ liquify-list-end {0}, {1} {0} a {1}
@msg Script file could not be written Soubor skriptu nelze zapsat
@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.
-2
View File
@@ -88,8 +88,6 @@
@msg Script file could not be written Scriptfilen kunne ikke skrives
@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.
-2
View File
@@ -5007,8 +5007,6 @@ liquify-list-end {0}, {1} {0} und {1}
@msg Script file could not be written Skriptdatei konnte nicht geschrieben werden
@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.
-2
View File
@@ -2839,8 +2839,6 @@ liquify-list-end {0}, {1} {0} και {1}
@msg Script file could not be written Δεν ήταν δυνατή η εγγραφή του αρχείου του σεναρίου
@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.
-2
View File
@@ -5117,8 +5117,6 @@ liquify-list-end {0}, {1} {0}, {1}
@msg Script file could not be written No se pudo escribir el archivo del script
@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.
-2
View File
@@ -5360,8 +5360,6 @@ liquify-list-end {0}, {1} {0} ja {1}
@msg Script file could not be written Komentosarjan tiedostoa ei voitu kirjoittaa
@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.
-2
View File
@@ -5074,8 +5074,6 @@ liquify-list-end {0}, {1} {0} et {1}
@msg Script file could not be written Le fichier du script n’a pas pu être écrit
@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.
-2
View File
@@ -7857,8 +7857,6 @@ liquify-list-end {0}, {1} {0} और {1}
@msg Script file could not be written स्क्रिप्ट फ़ाइल लिखी नहीं जा सकी
@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.
-2
View File
@@ -5952,8 +5952,6 @@ liquify-list-end {0}, {1} {0} és {1}
@msg Script file could not be written A parancsfájl fájlját nem sikerült írni
@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.
-2
View File
@@ -8920,8 +8920,6 @@ breakText Glyphs Glif
@msg Script file could not be written File skrip tidak dapat ditulis
@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.
-2
View File
@@ -5145,8 +5145,6 @@ liquify-list-end {0}, {1} {0} e {1}
@msg Script file could not be written Impossibile scrivere il file dello script
@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.
-2
View File
@@ -5981,8 +5981,6 @@ liquify-list-end {0}, {1} {0}、{1}
@msg Script file could not be written スクリプトのファイルを書き込めませんでした
@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.
-2
View File
@@ -8654,8 +8654,6 @@ liquify-list-end {0}, {1} {0} და {1}
@msg Script file could not be written სკრიპტის ფაილის ჩაწერა ვერ მოხერხდა
@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.
-2
View File
@@ -5910,8 +5910,6 @@ liquify-list-end {0}, {1} {0} 및 {1}
@msg Script file could not be written 스크립트 파일을 쓸 수 없습니다
@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.
-2
View File
@@ -90,8 +90,6 @@
@msg Script file could not be written Het scriptbestand kon niet worden geschreven
@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.
-2
View File
@@ -5247,8 +5247,6 @@ liquify-list-end {0}, {1} {0} i {1}
@msg Script file could not be written Nie można zapisać pliku skryptu
@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.
-2
View File
@@ -6292,8 +6292,6 @@ liquify-list-end {0}, {1} {0} e {1}
@msg Script file could not be written Não foi possível gravar o arquivo do script
@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.
-2
View File
@@ -5142,8 +5142,6 @@ liquify-list-end {0}, {1} {0} и {1}
@msg Script file could not be written Не удалось записать файл скрипта
@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.
-2
View File
@@ -5015,8 +5015,6 @@ liquify-list-end {0}, {1} {0} och {1}
@msg Script file could not be written Skriptets fil kunde inte skrivas
@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.
-2
View File
@@ -4843,8 +4843,6 @@ liquify-list-end {0}, {1} {0} ve {1}
@msg Script file could not be written Betiğin dosyası yazılamadı
@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.
-2
View File
@@ -5129,8 +5129,6 @@ liquify-list-end {0}, {1} {0} і {1}
@msg Script file could not be written Не вдалося записати файл скрипту
@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.
-2
View File
@@ -5642,8 +5642,6 @@ liquify-list-end {0}, {1} {0} và {1}
@msg Script file could not be written Không thể ghi tệp của tập lệnh
@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.
-2
View File
@@ -5637,8 +5637,6 @@ liquify-list-end {0}, {1} {0}和{1}
@msg Script file could not be written 无法写入脚本的文件
@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.
-2
View File
@@ -2978,8 +2978,6 @@ liquify-list-end {0}, {1} {0}和{1}
@msg Script file could not be written 無法寫入指令碼的檔案
@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.
+2 -1
View File
@@ -3097,7 +3097,8 @@ through `$`:
strict-mode code, which throws a `TypeError`. On a collection it throws `Not found`, except for the text of a number that is not an array index, as described above. Other members
those pages list, such as `app.version` and `Document.save()`, and the members of the pages of the page-item kinds
themselves that this page does not describe are not defined yet and read as `undefined`.
- `Document.saveAs(file, options?)` runs `file.saveAs`, and the document then has the new file.
- `Document.saveAs(file, options?)` runs `file.saveAs`, and the document then has the new file. Each warning the
save gives goes to the console as a line that starts with `saveAs: `.
`Document.exportFile(file, exportType, options?)` runs `document.export` and leaves the document's file as it is.
`app.open(file, documentColorSpace?, options?)` runs `document.open` and gives the new `Document`
(https://ai-scripting.docsforadobe.dev/jsobjref/Document/, https://ai-scripting.docsforadobe.dev/jsobjref/Application/).