Execute "batchPlay" for multiple times not working well

Hi everyone, I’m currently using API version 1 for batchPlay (async func or not). When trying batchPlay, I execute several of the processes but get the errors:

  • sometimes crash the photoshop
  • get a message “The command failed because Photoshop is in a modal state”.

Does anyone have an idea for this case? maybe a defer the script run first-in-first-out…
Thank inadvance!