Home Forums General XMetaL Discussion Special Characters toolbar Reply To: Special Characters toolbar

Derek Read

Reply to: Special Characters toolbar

Step 1:
Create a macro that types the character you want when it is run. At minimum it would probably contain code similar to this (JScript example):

Selection.TypeText("a");

Where “a” is, of course, replaced by the character you wish to insert. After compilation (if you are using XMetaL Developer to create your customizations) the macro section in the MCR file would probably look like this (I've made it hidden it so that it does not appear in the Macros list and I have not given it a shortcut key):

  Selection.TypeText("a");
]]>

Step 2:
(optional but recommended) create a bitmap for the character and add it to a new set of toolbar icons. This is described in XMetaL Developer under the topic “Adding new toolbar icons”. You might not need to do this if a suitable icon is available from those that we include with XMetaL Author.

Step 3:
Add a button to the toolbar that runs the macro when pressed. If this is just for you I would suggest just following the instructions in XMetaL Author under the topic “Create a button or menu”. If this is for a customization you will distribute to many people it would be best to add the button using a macro and distribute that as part of either an application-level or document-level customization. The APIs for manipulating toolbars and menus are in the Programmers Guide in XMetaL Developer.

Step 4:
Package up the bits and distribute them to all of your other users as part of their installation. If you are installing a set of customization files already it would be easiest to add that to that process. If not, and this is the only change you are making (seems unlikely) then you could make this as simple as creating a zip file to unpack on top of an XMetaL Author istallation (keeping in mind that the XMetaL Author uninstaller will leave your files behind).

Reply

Products
Downloads
Support