#22359
Patrick C
Participant

Just worked on the same problem today – guess I was lucky

The command line therefore is
set myarg=blabla && start "" "c:\Program Files\EmEditor\EmEditor.exe" /mf "d:\tmp\mymacro.jsee

The macro file code then is

var she = new ActiveXObject("wscript.shell");
myarg = she.ExpandEnvironmentStrings("%myarg%");
alert(myarg);

There is one important issue though:
Emeditor must not yet run when calling. Most likely because once running it would only have access to environment variables which existed upon starting EmEditor

Hope this helps
Patrick

PS Credits for those who brought me on the right path:
https://www.emeditor.com/forums/topic/macro-scripting-importexport-of-filter-settings/
https://stackoverflow.com/questions/21315708/reading-environment-variables-with-javascript
https://superuser.com/questions/424001/launch-windows-program-with-custom-environment-variable