exportFile() with showOptions - Terminate on cancel
Hi everyone,
I'm in the process of creating an InDesign panel with ExtendScript and am having issues exporting PDFs. My question is, is there any way to determine whether the user clicked cancel when exporting with options?
Here's the script below.
app.activeDocument.exportFile(ExportFormat.pdfType, File(exportPath), true);
This brings up the following window:

Although the InDesign file does not export on cancel, the remainder of my script still runs. The goal is to terminate the script on cancel. Any push in the right direction is greatly appreciated. Thanks so much!