Home Forums General XMetaL Discussion new beacon event (xmax api activeX) Reply To: new beacon event (xmax api activeX)

Derek Read

Reply to: new beacon event (xmax api activeX)

Given your description, I assume you want to handle some special case when the user is working in Plain Text view?

There are no events triggered when you close a tag.  You could try to write a script that detects which view the user is in and then deals with that specific character (greater than symbol). You would then assign the greater than symbol as the shortcut key for the macro containing the script. When that key is pressed the script will run. You will then need an if…then statement to decide what to do:

Use the ActiveDocument.ViewType property to detect which view the user is in.

1) If the user is editing in Plain Text view then you can assume they are closing a tag and you would do what you are planning to do in your script. To detect if this is specifically a closing tag (and not an opening tag or an empty tag) would require some more complicated script and that seems likely to be extremely hard to capture and I suspect it might be so complicated that you might as well call it impossible (the amount of script required would be extensive to capture everything).

2) If the user is editing in Tags On or Normal view then you would call this:
Selection.TypeText(">")

Reply

Products
Downloads
Support