I have many scripts where at some point I ask the user to confirm whether they want to proceed or not. Basically an "Are you sure?" question to make sure they really want to send 100 emails for example. I do this with a Custom Dialogue, Yes/No buttons and If Get(LastResponse) script steps.
I want to move away from custom dialogue boxes because they are ugly, you never know where they are going to open and what size they'll be. I'd like to use Popovers.
So my script now opens a Popover with the Yes/No questions and of course it needs to pause while the User decides which option they want. This all works well. My question is how do I make the Yes/No buttons resume the script?
For example I currently have the Yes button setting a variable $gOK=1. And my script will do what it needs to do if $gOK=1 otherwise it will exit. But how do I get the Yes button to set that variable and resume the script? (And naturally the same solution for the No button $gOK=0)
I would prefer not to have to split this into 2 scripts.