If answer is Yes it calls a script that does some work with output to user. Then I want to make user confirm Yes/No that everything was OK. Here I open another MessageBox, but this time from script.
Problem is that actiona does not wait for the MessageBox to be closed. As of now this is at the end of my project, and the MessageBox does not show as the script finishes. If I add a "pause" after the call of the script that opens the MessageBox, it is shown, so the code works in itself.
How to make actiona wait for the MessageBox to be closed?
Sample code:
Code: Select all
function confirm() {
var c = new MessageBox({
title: "Press yes or no",
icon: MessageBox.Warning,
buttons: MessageBox.Yes | MessageBox.No,
text: "Did cursor move to the correct positions?",
onClose: function(e) {
Console.print(e)
}
});
c.show();
}
function validate() {
var x, y, z;
...
}
if (validate) {
validate_data();
confirm();
}