- AuthorPosts
- October 18, 2016 at 7:35 am #21197PaulParticipant
Steps:
Emeditor is running with a file open. I launch emeditor using a shortcut with the following command line:
"C:\Program Files\EmEditor\EmEditor.exe" /mf "C:\Users\pggardne\Documents\My Macros\Create DB Server Scripts.jsee"
where the macro contains the followingeditor.NewFile(); editor.ExecutePlugin( "Snippets.dll", eePluginUserMessage, 1, "Build\\DB Server Commands" );
That snippet has parameters like ${SiteNumber}, aka named parameters, so a dialog box asking for values appears. This dialog appears to be the catalyst.
The result of the shortcut is that in my current instance, I get a new tab and the macro launches with the parameter dialog box. Once the macro is complete, I then get a new instance of emeditor and the macro re-launches. I tried commenting out the .NewFile command, but same result.
If I add ‘/sp’ to the command line, I only get the 2nd instance with the macro. Nothing in my current instance.
If I remove the macro, and use /iq, /od or something else, I don’t see this behavior – everything occurs in the current instance. I also tried some other macros, but didn’t see the two instances either. It appears to be only with the /mf command calling the snippet plug in, and that snippet uses a named parameter like ${test}. A built-in parameter like ${seltext} doesn’t show this behavior.
I don’t know when this may have occurred. This is the first time I have tried to specify the macro from the command line. Trying it out in place of a request to add macro execution to the system tray menu.
Thanks,
Paul - AuthorPosts
- You must be logged in to reply to this topic.