Actually, instead of using run-script before 'stop', just use run-script X and in the dialog request use an if statement to check that script X was called, and then use the StopDialog Function. I think this can be done with using the stop command in the dialog too, incase you want this to only happen once.
