- December 4, 2012 at 8:03 am #10652
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.December 4, 2012 at 4:13 pm #10654
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.
Thank you,December 5, 2012 at 9:41 am #10656
Sorry, I found the reason:
I have an event-driven macro that runs at [Group Window Closed] etc. So this problem was because another macro ran during the macro running. (This is a limitation?)December 5, 2012 at 10:30 am #10658
You might have problems caused by your event-driven macros. Try and see if you need this macro:
You must be logged in to reply to this topic.