General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Some (all?) event macros not executed

  • hhvmetaal

    Some (all?) event macros not executed

    Participants 1
    Replies 2
    Last Activity 7 years, 10 months ago


    I am using Author Enterprise I have a .mcr file in which some or all event macro's are executed (e.g. I have added a pre-save-file macro). To verify if anything at all is executed I added a macro with a shortcut-key at the end. When I press the shortcut the macro is executed, so the .mcr file is successfully read and processed. (I had the experience that due to syntax errors the .mcr file would simply not be loaded or partially loaded. So having a working macro at the end to verify the .mcr file is still working helps.)

    Anyway, without going into detail I was just wondering if others have seen this behavior and know what I am doing wrong.


    Huib Verweij.



    Reply to: Some (all?) event macros not executed

    Well, usually I use alert boxes inside macros so I know where it is broken if it does not work. If somebody know better way to “debug” please tell me.


    Derek Read

    Reply to: Some (all?) event macros not executed

    It likely won't help in this case though. It sounds like the macro(s) is not even being triggered, so an alter (or debugger statement) won't even be triggered.

    I think I'd have to see a complete MCR file to figure out what's going wrong here. It would be best to submit that to XMetaL Support.

    @barbwire — Put this at the start of any JScript Macro (or a later position where you want debugging to begin):

    You need a debugging environment for that to be useful though. If you don't have Visual Studio or another similar environment then you can get the Microsoft Script Debugger here:

    Debugging with alerts can be helpful for simple scripts and many people get by OK using this method, but debugging can be vastly more powerful and effective. All debugging tools let you step through the script line by line, and some let you set break points, check values of variables and properties, expand an object to view all of its available properties and methods, alter variable values and continue execution, and other things.


  • You must be logged in to reply to this topic.

Lost Your Password?