need help convert script from VBS to JS

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

Moderators: jiri, drakinite, Addon Administrators

Milode
Posts: 8
Joined: Sat Apr 17, 2021 1:36 pm

need help convert script from VBS to JS

Post by Milode »

Dear all,
Sorry, unfortunately I have less experience with JS, but want to use at least one script in in MM5 that I wrote in VBS for MM4. For the script I want to determine the currently selected Node-Name in the Media-Tree, in VBS it was easy:

VBS:
Sub AlbumName_From_PlaylistName

Dim NodeName
NodeName=SDB.MainTree.CurrentNode.Caption
......



Can someone help me?
What is the corresponding command in JS?

Thank a lot for your support
Best Regards
Michael
TIV73
Posts: 229
Joined: Sat Nov 12, 2011 1:31 pm

Re: need help convert script from VBS to JS

Post by TIV73 »

Try

Code: Select all

currentTabControl.mediatree.controlClass.dataSource.focusedNode.title
That should give you the caption of whatever node is currently selected on the media tree.
Post Reply