Skip to main content
Inspiring
September 23, 2017
Question

Play with addDocumentNoUI

  • September 23, 2017
  • 1 reply
  • 2511 views

var doc = app.documents.addDocumentNoUI();

$.writeln(app.documents.length) // 0

var t = doc.textFrames.add();

t.contents = doc.name;

t.selected = true;

$.writeln(t.selected) // true

$.writeln(doc.selection.length) // 1

/*

   

$.writeln(app.selection.length) // error, no such element

app.paste() // error, no documents are opened.

// and you can not duplicate or move items from visible document to the NoUI document.

app.redraw(); // crush!

*/

doc.saveNoUI(File('~/desktop/NoUI.ai'));

doc.closeNoUI();

$.hiresTimer; // It seems with NoUI mode, will take less executing time, need more tests.

This topic has been closed for replies.

1 reply

Silly-V
Legend
September 23, 2017

is this in the new version

moluappleAuthor
Inspiring
September 24, 2017
Silly-V
Legend
March 12, 2018

What are some cases this would be useful for? I was going to try to experiment with this, but then saw there is no option to open any existing document with NoUI. Such may of course either quicken Illustrator batch-processing or reduce some of the issues surrounding it. But, at this point it appears we shall never know. However, it is possible to add the NoUI documents with the new document presets - among which the various new document profiles could be chosen. Could these new document profiles potentially be abused for holding complex artwork within the symbols saved as the part of a new document profile? If so, then some NoUI batch processing could be accomplished with opening some new document profile, pulling down  a symbol or several symbols and obtaining artwork from them, then manipulating this artwork, and saving the output NoUI document. The test I would like to create is to add a symbol with some editable text into one of my new document profile .ai files and then attempt to create the new NoUI document based on this profile, then try to instantiate and expand the symbol to get the editable text and export output files.