Answered
How to do "Export Selection..." in Illustrator CC scripting?
I tried app.activeDocument.selection[0].exportFile(ExportFormat.PNG, File("~/Desktop/temp/1.png"), false);
but it says exportFile is not a function in ExtendedScript.
I tried app.activeDocument.selection[0].exportFile(ExportFormat.PNG, File("~/Desktop/temp/1.png"), false);
but it says exportFile is not a function in ExtendedScript.
if you're using the latest CC version, use this line
app.activeDocument.exportSelectionAsPNG(File("c:/temp/selection.png"));
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.