Home Forums General XMetaL Discussion Create toolbar button or macro to go to URL Reply To: Create toolbar button or macro to go to URL

Derek Read

Reply to: Create toolbar button or macro to go to URL

If your “tools group” builds customizations for XMetaL then they should probably do this for you. That way they can integrate this into what they have built without fear of having their code broken.

You will need to create an MCR file containing code similar to what I have specified (or modify an existing one). You can do that with any text editor if you don't have XMetaL Developer but you need to get the format correct (it is pretty obvious once you open an MCR file and have a look). A user initiated macro can be given any name as long as it isn't the name of an event macro (which are predefined and described in the XMetaL Developer Programmers Guide).

It might be as simple as dropping an MCR file with content similar to this into the Startup folder in your XMetaL Author installation path:


Application.ShowPage("http://ussm-infodev2.corp.company.com:8031/termcontribution.html");
]]>

var oWSH = new ActiveXObject("WScript.Shell");
oWSH.Run("http://ussm-infodev2.corp.company.com:8031/termcontribution.html");
oWSH = null;
]]>

Generally speaking, user initiated macros like this do not conflict with other customizations, unless there happens to be a naming collision on the macro name.

If you want to create a button for it follow the instructions in the help topic “Associate a macro with a toolbar button” (that part you can do in XMetaL Author's UI).

Reply

Products
Downloads
Support