Skip to main content
Participating Frequently
January 2, 2024
Answered

Error 1200: an Illustrator error occurred: 1129270854 (FNOC)

  • January 2, 2024
  • 3 replies
  • 2164 views


Hi all,

 

Error 1200: an Illustrator error occurred: 1129270854 (FNOC)

Line: 19 -> doc.saveAs(File(originalDocPath + "|" + originalDocName + "_SAMPLE FA.pdf"), opts);

Right at the end of running the script to outline fonts, delete unused swatches etc, I get the above. Everything has worked just the file saving part fails.

And the thing thats driving my totally nuts, is it works on M1 iMacs but NOT with any M2 Studios. I've tried opening the .js files, duplicating and re-saving them, from the Mac Studio...

HELLLLLLLLP... I'm at my wits end. BIG, BIG thank you for any help.

HNY!!!

This topic has been closed for replies.
Correct answer CarlosCanto

ooooooh, I think I see what the problem might be

 

perhaps you didn't mean to use the Pipe "|" but instead you meant to use the Slash "/" (Folder separator)

 

replace this

var fileName = originalDocPath + "|" + originalDocName + "_SAMPLE FA.pdf";

 

with this

var fileName = originalDocPath + "/" + originalDocName + "_SAMPLE FA.pdf";

3 replies

CarlosCanto
Community Expert
CarlosCantoCommunity ExpertCorrect answer
Community Expert
January 2, 2024

ooooooh, I think I see what the problem might be

 

perhaps you didn't mean to use the Pipe "|" but instead you meant to use the Slash "/" (Folder separator)

 

replace this

var fileName = originalDocPath + "|" + originalDocName + "_SAMPLE FA.pdf";

 

with this

var fileName = originalDocPath + "/" + originalDocName + "_SAMPLE FA.pdf";

Participating Frequently
January 2, 2024

Samer error - sorry

CarlosCanto
Community Expert
Community Expert
January 3, 2024
quote

Samer error - sorry


By @LEE324144488r75

 

what did you try? can you post your script?

m1b
Community Expert
Community Expert
January 2, 2024

Hi @LEE324144488r75, I suggest adding something like this:

try {
    var fileName = originalDocPath + "|" + originalDocName + "_SAMPLE FA.pdf";
    doc.saveAs(File(fileName), opts);
} catch (error) {
    alert('Error saving to "' + fileName + '". (' + error.message + ')');
    // handle error here
}

This will at least connect the error with the specific path that it was trying.

 

Like Carlos, I suspect it is a bad path. However, I have used pipe characters on MacOS plenty of times and I don't think that is the problem. Pipe characters must be escaped or quoted on the command line, but many characters are like that. On MacOS, I believe colons are the main character to avoid. Anyway, take a screenshot of the error alert that shows the path and that way you can test that path independent of your script. An alternative issue could be the contents of `opts` which we don't know. If you use VSCode with the ExtendScript Debugger, you can put a debugger call right before the saveAs:

var fileName = originalDocPath + "|" + originalDocName + "_SAMPLE FA.pdf";
debugger;
doc.saveAs(File(fileName), opts);

 and then, in your Debug console you can type `opts` to see its contents:

Hope that helps as a start.

- Mark

Participating Frequently
January 2, 2024

// The active document
var doc = app.activeDocument;
// The path of the original document
var originalDocPath = doc.path;
// The name of the original document
var originalDocName = doc.name;
// An array of all the layers in the active document
var allLayers = doc.layers;
// Get just the file name. Ignore the file extension .pdf and .ai
originalDocName = originalDocName.replace(/\.pdf|\.ai/gi, "")


{
// Setup pdf save options
var opts = new PDFSaveOptions();
// Use the preset named "XXX"
opts.pdfPreset = "SEBNINI Press Quality";
// Save the document in the original folder using the original name with _SAMPLE FA suffix
{
var fileName = originalDocPath + "|" + originalDocName + "_SAMPLE FA.pdf";
doc.saveAs(File(fileName), opts);
} catch (error) {
alert('Error saving to "' + fileName + '". (' + error.message + ')');
// handle error here
}

app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

}

 

Participating Frequently
January 2, 2024

Tried that, unless i placed it wrong, error attached. Thanks for trying buddy.

CarlosCanto
Community Expert
Community Expert
January 2, 2024

On Windows, the Pipe Character "|" is not allowed in a file name, that might be the case on M2 as well.

 

Carlos

Participating Frequently
January 2, 2024

Thanks for the reply.... so if that was the case on a Mac also, what would go in its place?

CarlosCanto
Community Expert
Community Expert
January 2, 2024
quote

Thanks for the reply.... so if that was the case on a Mac also, what would go in its place?


By @LEE324144488r75

 

this should be pretty easy to test, replace the "|" character in your original program with a dash "-" to see if it works