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?

The ultimate solution for this would probably be for us to provide an equivalent to the Application.Skuname or Application.VersionNumber property from XMetaL Author in XMAX. Until that happens you can use something like this:

[code]
//XMetaL Script Language JScript:
try {
if (Application) {
Application.Alert(“XMetaL Author”);
}
}
catch(e) {
ActiveDocument.Host.Alert(“XMAX”);
}
[/code]

This code relies on the lack of the Application object in XMAX to uniquely identify it (and yes, I realize relying on an error being thrown is obviously not the best thing – but I cannot think of anything else that will work with current versions).

If this is not acceptable then you may need to split your projects apart (until we implement a nicer solution or someone else can suggest something better).

Reply

Products
Downloads
Support