Home Forums General XMetaL Discussion How to identify XMAX versus XMEE in macros? Reply To: How to identify XMAX versus XMEE in macros?

Derek Read

Reply to: How to identify XMAX versus XMEE in macros?

Here is a more elegant solution that implements this in the form of a function you can reuse inside your own if...then statements or elsewhere (as in the example that follows the function):

[code]// XMetaL Script Language JSCRIPT:
function isXMAX()
{
  try { if (Application) { return false; } } catch (e) { ; }
  return true;
}

if (isXMAX()) {
  // Hello XMAX
  ActiveDocument.Host.Alert(“XMAX”);
} else {
  // Hello XMAU
  ActiveDocument.Host.Alert(“XMetaL Author”);
}[/code]

Reply

Products
Downloads
Support