events - InDesign CC 2014 Extendscript: How to reliably close document after asynchronous PDF export -
i've written indesign script generates documents need exported pdf files. exports happen asynchronously user can continue working. generated documents remain open in background during export process, , closed once associated export complete.
how can reliably capture export failure, such when user cancels background export task background tasks panel?
the importexporttask.failed_export event doesn't appear work described documentation, regardless of whether listen on app or document being exported.
i've tried using idletasks periodically check changes in status of associated backgroundtasks, makes me feel dirty, , idleevent.on_idle events don't trigger reliably enough purposes (based on own experience).
i'd appreciate if me this, i've been spinning wheels on 1 far long.
thanks!
check return value of backgroundtaks's waitfortask(), taskstate:
taskstate.cancelled | task cancelled (either before ran or during execution taskstate.cancelling | task signalled cancel did not stop yet taskstate.completed | task completed execution (successfully or errors) taskstate.queued | task queued , waiting scheduled execution taskstate.running | task running taskstate.waiting | task waiting
Comments
Post a Comment