0 Replies Latest reply on Jul 16, 2015 12:00 PM by cloud53a76382582

    Background Export Cancelled - Event? (JS)

    cloud53a76382582

      I'm having trouble figuring out how to capture when a user cancels a background export task (from the background tasks panel). ImportExportTask.FAILED_EXPORT doesn't appear to work as described by the documentation, regardless if I listen on the app or the document being exported.

       

      I've also tried using Idletasks which wait for changes in status to the BackgroundTask, but it seems really dirty, and IdleEvent.ON_IDLE events don't trigger reliably enough for my purposes (based on my own experience).

       

      Ideally I'd like to capture the completion of asynchronous export events (success, failure, or cancellation) as soon as they happen, so that I can close the associated documents (which my script has generated and remain open in the background during the export process) and let the user get on with their day. Success events are no problem, it's the others I'm having trouble with.

       

      I'd really appreciate it if anyone could help me with this, I've been spinning my wheels on this one for far too long.

       

      Thanks!

       

      PS: I am using JS, and Indesign CC 2014