MM4 scripts conversion (VBS->JS)

To discuss development of addons / skins / customization of MediaMonkey.

Moderators: jiri, drakinite, Addon Administrators

jiri
Posts: 5420
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

MM4 scripts conversion (VBS->JS)

Post 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
jiri
Posts: 5420
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: MM4 scripts conversion (VBS->JS)

Post 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
jiri
Posts: 5420
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: MM4 scripts conversion (VBS->JS)

Post 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
jiri
Posts: 5420
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: MM4 scripts conversion (VBS->JS)

Post by jiri »

An updated version was uploaded. It has working 'case' support, better 'loops' support and many other improvements.

Jiri
jiri
Posts: 5420
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: MM4 scripts conversion (VBS->JS)

Post by jiri »

A new version was uploaded to fix a regression.

Jiri
jiri
Posts: 5420
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: MM4 scripts conversion (VBS->JS)

Post by jiri »

A new version was uploaded. There are many improvements to better handle VBS language features.

Jiri
drakinite
Posts: 971
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: MM4 scripts conversion (VBS->JS)

Post 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.
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Locked