Page 1 of 1
External Tools for MM5
Posted: Wed Apr 06, 2022 11:37 am
by Andre_H
As an example how to open external tools (MP3Tag here):
Code: Select all
//* open file or folder of selected track in MP3Tag.*//
// variables ...
var AppPath = "\\\\YourServer\\YourShare\\Mp3Tag\\MP3Tag.exe"
//var AppPath == "X:\\YourFolder\\Mp3Tag\\MP3Tag.exe"
actions.openFileMP3Tag = {
title: _('Open track in MP3Tag ...'),
icon: 'openMP3Tag',
disabled: uitools.notMediaListSelected,
visible: window.uitools.getCanEdit,
execute: async function () {
var list = await uitools.getSelectedTracklist().whenLoaded();
if (list.count === 0) {
return;
}
list.forEach(function(itm) {
var AppParameters = '/fn:"' + itm.path + '"'
app.utils.shellExecute(AppPath, AppParameters)
});
}
}
actions.openFolderMP3Tag = {
title: _('Open track folder in MP3Tag ...'),
icon: 'openMP3Tag',
disabled: uitools.notMediaListSelected,
visible: window.uitools.getCanEdit,
execute: async function () {
var list = await uitools.getSelectedTracklist().whenLoaded();
if (list.count === 0) {
return;
}
list.forEach(function(itm) {
var AppParameters = '/fp:"' + itm.path + '"'
app.utils.shellExecute(AppPath, AppParameters)
});
}
}
window._menuItems.editTags.action.submenu.push({
action: actions.openFileMP3Tag,
order: 1,
grouporder: 2
});
window._menuItems.editTags.action.submenu.push({
action: actions.openFolderMP3Tag,
order: 2,
grouporder: 2
});
Credits to all the guys in the addon subforum, I just jingled it together following the instructions from there.
It's nowhere near the same as the addon linked above, but possibly an approach.
Re: MMW5 Addon & Skin Requests
Posted: Wed Apr 06, 2022 4:03 pm
by tbm72
Andre_H wrote: ↑Wed Apr 06, 2022 11:37 am
As an example how to open external tools (MP3Tag here):
This looks very promising thanks! Sorry for the stupid question but how do I go about getting this code into MM? Do I need to look at the scripts folder or does it involve coding as an addon?
Happy to experiment if someone can point me in the right direction!
Re: External Tools for MM5
Posted: Wed Apr 06, 2022 4:24 pm
by drakinite
Hey guys, FYI I split these two posts off the Addon & Skin Requests thread to keep it on topic.
Re: MMW5 Addon & Skin Requests
Posted: Wed Apr 06, 2022 5:26 pm
by Andre_H
tbm72 wrote: ↑Wed Apr 06, 2022 4:03 pm
Sorry for the stupid question but how do I go about getting this code into MM? Do I need to look at the scripts folder or does it involve coding as an addon?
it's a subfolder under "scripts". if you PM me a mail adress, i can zip and send you the files, it's just 6files and 24kB at all.
Re: External Tools for MM5
Posted: Wed Apr 06, 2022 5:48 pm
by tbm72
Thanks Andre, I seem to have a problem sending PMs for some reason - they just get put in my Outbox but not sent. I'll try again tomorrow.
Re: External Tools for MM5
Posted: Thu Apr 07, 2022 1:29 am
by Andre_H
Mail is on the way.
(I guess PM stay in outbox until the Receiver gets them)
Re: External Tools for MM5
Posted: Thu Apr 07, 2022 7:06 am
by tbm72
This is great Andre! I've managed to use your code to get an option which opens a selected track in XYplorer which is just what I'm after. The last step I'm stuck on is getting the option to appear under the 'Find more from same>' submenu when I right-click a track.
My slightly edited version of your code at the moment contains this:
Code: Select all
window._menuItems.editTags.action.submenu.push({
action: actions.openFolderXYplorer,
order: 1,
grouporder: 2
});
Which works great but it puts the option as the first entry under the 'Edit Tags>' submenu. What I'd like is for it to be at the bottom of the 'Find more from same>' submenu. I've been reading through the 'Getting Started (Addons)' help page and also tried to decipher the 'actions.js' file but I can't quite find the right code to get it placed under that submenu option. I've tried things like:
Code: Select all
window._menuItems.findMoreFromSame.action.submenu.push
But I just get an error. I'm happy to admit I know nothing about coding but I think I'm almost there! Can anyone give me the final hint to get this code placed under the 'Find more From' submenu?
Re: External Tools for MM5
Posted: Thu Apr 07, 2022 1:13 pm
by drakinite
Took a bit to find, but it looks like it's defined in
uitools.findMoreMenuActions.explorerFolder. It's a bit more complicated than adding to an array in window._menuItems.x. More info on the
override method here:
https://www.mediamonkey.com/wiki/Import ... )#Override
Code: Select all
uitools.findMoreMenuActions.explorerFolder.override({
getMenuItems: function($super, track) {
var ret = $super(track);
ret.push({
title: 'Hello World',
icon: 'folder',
execute: function () {
console.log('Hello World');
},
order: 99
});
return ret;
}
});
Change the title, icon, execute, and order inside of that
ret.push statement to whatever you like. You could also change it to
ret.push(actions.openFolderXYplorer); if you want.
Re: External Tools for MM5
Posted: Thu Apr 07, 2022 1:19 pm
by tbm72
drakinite wrote: ↑Thu Apr 07, 2022 1:13 pm
Took a bit to find, but it looks like it's defined in
uitools.findMoreMenuActions.explorerFolder. It's a bit more complicated than adding to an array in window._menuItems.x. More info on the
override method here:
https://www.mediamonkey.com/wiki/Import ... )#Override
Code: Select all
uitools.findMoreMenuActions.explorerFolder.override({
getMenuItems: function($super, track) {
var ret = $super(track);
ret.push({
title: 'Hello World',
icon: 'folder',
execute: function () {
console.log('Hello World');
},
order: 99
});
return ret;
}
});
Change the title, icon, execute, and order inside of that
ret.push statement to whatever you like. You could also change it to
ret.push(actions.openFolderXYplorer); if you want.
Thanks so much for looking into that Drakinite, really appreciate your help. I'll have a good look through that later

Re: External Tools for MM5
Posted: Fri Apr 08, 2022 12:14 pm
by Ludek
Alternativelly use this:
Code: Select all
uitools.findMoreMenuActions.xyplorerFolder = {
getMenuItems: function (track) {
if (!_utils.isRemoteTrack(track))
return [{
title: function () {
return _('Folder') + ' (XYplorer)';
},
icon: 'folder',
execute: function () {
bindAction( actions.openFolderXYplorer, track).execute();
},
order: 90
}];
}
}
And in the execute method of action openFolderXYplorer you can access the track via this.boundObject.
So the path to open will be this.boundObject.path
Re: External Tools for MM5
Posted: Wed Nov 27, 2024 10:25 pm
by carbykev
Hello all,
I miss External Tools from MM2,3,4. I've been using free MM since 2003, Gold version since May 2009.
I switched to MMW5 about a year ago and have struggled since editing files. I'm not a programer, etc. I would love to have External Tools in MMW5, as I do a lot of audio editing, etc.
I've looked at the available addon list and it is not there for MMW5, only the last version 1.4 for MMW4.
I don't know how to 'add the script' or get it listed under Tools, or right-click.
Any help would be greatly appreciated. If not I'll either have to go back to MMW4 or try another organizer (don't want to, really love MM!).
Thanks in advance for your help.
Regards,
Kevin
Re: External Tools for MM5
Posted: Wed Dec 04, 2024 3:02 pm
by f1oren
Hello
Like Kevin I am trying to understand how to add in MediaMonkey 5 the possibility to open files directly in Mp3Tag. Is it possible to have a step-by-step explanation? Thanks in advance