Quantcast
Channel: Adobe Community : Discussion List - Illustrator Scripting
Viewing all articles
Browse latest Browse all 3671

Play with addDocumentNoUI

$
0
0
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.

Viewing all articles
Browse latest Browse all 3671

Trending Articles