Page 1 of 1

MM4 scripts conversion (VBS->JS)

Posted: Mon Jan 02, 2017 8:42 am
by jiri
You can find the most recent version of VBS->JS conversion Addon at https://www.mediamonkey.com/addons/brow ... vbs-to-js/.

Technically, the tool uses a set of Regular Expressions to convert VBS code to JavaScript. You can find the rules in vbs2js_conversions.js inside the folder of this addon and so you can update it with fixes needed for your scripts.

Known limitations:
- Uses Regular Expressions, not a full VBS parser and so some language constructs (particularly complex, nested) can be misunderstood and thus converted incorrectly.
- There's an attempt to convert even UI code, but it's very rough, incomplete and rather intended for testing.
- More MM4->MM5 API conversions will be added.

Remember, this is the very first version, please leave us feedback, report missing features, submit your updated Regular Expressions, etc.

This topic is locked, so that you can subscribe it in order to receive updates about this script. Please discuss this script in other threads.

Thanks!
Jiri

Re: MM4 scripts conversion (VBS->JS)

Posted: Wed Jan 04, 2017 11:15 am
by jiri
There was a new version uploaded, again to http://www.mediamonkey.com/beta/convertVBS2JS.mmip.

It supports much more VBS language constructs and also adds some more MM4 API conversions.

Jiri

Re: MM4 scripts conversion (VBS->JS)

Posted: Mon Jan 30, 2017 10:01 am
by jiri
You can find the latest update at http://www.mediamonkey.com/beta/convertVBS2JS.mmip.

It has many new features added, more complex scripts were already successfully converted by this version.

Jiri

Re: MM4 scripts conversion (VBS->JS)

Posted: Wed Feb 01, 2017 9:21 am
by jiri
An updated version was uploaded. It has working 'case' support, better 'loops' support and many other improvements.

Jiri

Re: MM4 scripts conversion (VBS->JS)

Posted: Wed Apr 12, 2017 5:55 am
by jiri
A new version was uploaded to fix a regression.

Jiri

Re: MM4 scripts conversion (VBS->JS)

Posted: Mon Dec 09, 2019 1:06 pm
by jiri
A new version was uploaded. There are many improvements to better handle VBS language features.

Jiri

Re: MM4 scripts conversion (VBS->JS)

Posted: Wed May 26, 2021 5:08 pm
by drakinite
A new version has been uploaded, now to the Addons site: https://www.mediamonkey.com/addons/brow ... vbs-to-js/

This version should no longer crash when it encounters errors with its regexes, and instead logs its errors in a comment at the bottom of the output.