I'd like to place an image onto an Adobe Illustrator artboard using an image file selected in Finder. Can this be done using JavaScript?
var FINDER = Application("Finder");
FINDER.includeStandardAdditions = true;
var ImageA = FINDER.selection();
doc = app.activeDocument;
var adddoc = app.documents.add( null , 1275.59,898.58);
var placedItem = doc.placedItems.add();
placedItem.file = new File(ImageA);