This is a simplified test macro, for reproducing a problem I encountered:
WshShell = new ActiveXObject("WScript.Shell");
var app = editor.FullName;
for (var ii=0; ii<5; ii++)
if (!confirm("Continue?")) Quit();
WshShell.Run (""" + app + """);
If as expected, every time before a new EmEditor window is launched, there should be a confirmation prompt.
But, if I close one of the EmEditor windows launched by this macro, and then confirm the prompt, the For loop will go on running to its end without any pause, all the rest of the EmEditor windows will be launched with no confirmation prompt.
There’s no such a problem if EmEditor is running more than one process, or if WshShell.Popup is used instead of the Confirm method.
I am not sure your test environment. Is the “Enable Tabs” set? If you are using the Tabs, you won’t be able to close a new tab that is created during the macro because the “Confirm” dialog box is the foreground window. If the Enable Tabs is not set, you can close a new created window during the macro, but the macro will continue as expected. Please explain the detail procedure to reproduce the issue.