Pages: 1
Author Topic: Some (all?) event macros not executed  (Read 2052 times)

Posts: 3

« on: March 16, 2015, 04:12:34 PM »


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.

Posts: 44

« Reply #1 on: March 17, 2015, 01:49:47 AM »

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
Program Manager (XMetaL)

Posts: 2621

« Reply #2 on: March 17, 2015, 01:42:43 PM »

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.
Pages: 1
Jump to:  

email us