General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › New Feature Request: Use modern JavaScript
-
jodekirk May 29, 2019 at 2:06 pm
New Feature Request: Use modern JavaScript
May 29, 2019 at 2:06 pmParticipants 0Replies 1Last Activity 3 years, 9 months agoIs there any way to use modern JavaScript with XMetaL Developer for macros? I would like to use the new ES2015 or newer JavaScript syntax and features. Currently I have been using lots of polyfills.
I would like to use the new features such as:
http://es6-features.org/#StringSearching
http://es6-features.org/#StringInterpolationI keep forgetting old JScript syntax now that I've been using modern JavaScript in other web development projects for over 4 years.
Thanks,
Jeremy OdekirkDerek Read May 29, 2019 at 10:27 pm
Reply to: New Feature Request: Use modern JavaScript
May 29, 2019 at 10:27 pmIn theory yes…if you can find and install a JavaScript engine that meets those needs.
Windows includes JScript and VBScript with the Windows Script Host but you can install other script engines. Such an engine would probably need to identify itself using a name other than “JScript” to avoid conflicts with the Windows Script Host version of JScript. The script engine's name is what you insert in a macro inside the MCR file used by XMetaL Author to let it know which script engine to tell Windows Script Host to use to run the script for that particular macro.
Whether such an engine exists for Windows I don't know. It needs to meet these requirements: https://docs.microsoft.com/en-us/scripting/winscript/windows-script-engines
This would be similar to people that install and use the PerlScript (ActivePerl) or PythonScript (ActivePython) engines with XMetaL Author. Most people are using JScript or VBScript as they do not require additional software to be installed, but there are a number of XMetaL Author users that do use these other engines.
-
AuthorPosts
- You must be logged in to reply to this topic.