Copy link to clipboard
Copied
Hallo,
ich habe ein Script, welches eine XML in einem Dokument aktualisiert:
_myXMLFileRe = new File(xmlFile);
_myXMLFileRe.encoding = 'UTF-8';
_myXMLFileRe.open('w');
_myXMLFileRe.write(xmlContent);
_myXMLFileRe.close();
Nach dem Abschluss soll die Datei auch aktualisiert werden.
var alllinks = app.activeDocument.links;
for (i = 0; i < alllinks.length; i++) {
var cur_link = alllinks[i];
if (cur_link.status == LinkStatus.linkOutOfDate){
cur_link.update();
}
}
Einzeln gehen die Schnipsel,zusammen bekomme ich aber einen Fehler.
Die Datei wird gespeichert, aber die Aktualisierung scheitert. Als Meldung bekomme ich Syntaxfehler Zeile: 1, Spalte 1.
Ich kann dann auch nicht mehr über das Verknüpfen-Bedienfeld den Link aktualisieren, es erscheint die gleiche Meldung.
Hat jemand eine Idee?
(Hinweis: Doppelpost https://www.hilfdirselbst.ch/foren/Verkn%FCpfung_aktualisieren_P579763.html )
Copy link to clipboard
Copied
The first look at your code shows an obvious error which could be a typo
var alllinks = app. activeDocument. left;
should be written as follows
var alllinks = app.activeDocument.links;
Try this change.
-Manan
Copy link to clipboard
Copied
Funny. Manan, that error you mentioned sneaked in through the forum's Translate function!
The original is reading app.activeDocument.links
In German the word "links" can be translated to the English "left".
To Mario Fritsche:
To avoid that error, use the "Insert/Edit code sample" function: </> in the forum editor.
Use language Javascript as option.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
To Mario Fritsche:
To avoid that error, use the "Insert/Edit code sample" function: </> in the forum editor.
Use language Javascript as option.
Hallo,
wollte ich machen, hab die Option aber in der mobile-Ansicht nicht gefunden...