Button “Process” - On click button process it is manipulating document.
Button “Cancel” - On click button cancel, I want to stop the execution of program, which is happing on button Process click.
Earlier I was reloading the plugin to stop execution( window.location.reload() ).
Is there any way to stop it?
Thanks
If you’re doing doc manipulation, you must run it in executeAsModal(), which shows a progress bar when it takes longer than a couple of seconds and there’s a Cancel button, which, when clicked, cancels script execution. Are you saying that button isn’t working?
I don’t think there’s a way (there was a topic somewhere here about this). But you wouldn’t be able to access your button while progress bar is shown in modal execution anyway, would you?
Yes, I am able to access button because plugin is doing some API call, so things are happing in asynchronous way. That is why I have implemented custom progress bar and cancel button.