by drakinite » Tue Oct 12, 2021 7:41 pm
There are a few different ways, but they all revolve around the structure of an MMIP (MediaMonkey Install Package), which is essentially a renamed zip file. All the info you'll need is on the wiki, but most important is this section:
https://www.mediamonkey.com/wiki/Gettin ... _Structure
1. MediaMonkey has a special structure for allowing addons to append their code to an existing script via the
_add suffix. So for example, if you have code specifically related to the TrackListView control (controls/trackListView.js), you'll put it in a file named trackListView_add.js within a "controls" subfolder. When MM loads, it'll append that code to trackListView.js and run it. If your code involves new actions, you'll need to define them in a file called actions_add.js (in the folder root).
2. If your code is relatively simple and doesn't involve any controls or actions, you can put it in a file named init.js in the folder root. MediaMonkey will automatically run addons' init.js if it exists.
For more references, take a look at addons within the SampleScripts folder in your MM install.
There are a few different ways, but they all revolve around the structure of an MMIP (MediaMonkey Install Package), which is essentially a renamed zip file. All the info you'll need is on the wiki, but most important is this section: https://www.mediamonkey.com/wiki/Getting_Started_(Addons)#Folder_Structure
1. MediaMonkey has a special structure for allowing addons to append their code to an existing script via the [b]_add[/b] suffix. So for example, if you have code specifically related to the TrackListView control (controls/trackListView.js), you'll put it in a file named trackListView_add.js within a "controls" subfolder. When MM loads, it'll append that code to trackListView.js and run it. If your code involves new actions, you'll need to define them in a file called actions_add.js (in the folder root).
2. If your code is relatively simple and doesn't involve any controls or actions, you can put it in a file named init.js in the folder root. MediaMonkey will automatically run addons' init.js if it exists.
For more references, take a look at addons within the SampleScripts folder in your MM install.