To Reproduce:
create a file called, say, testJScript.js in the MediaMonkey/scripts/auto folder and past the following code into it:
Code: Select all
function OnStartup()
{
var UI = SDB.UI;
var Mnu = UI.AddMenuItem( UI.Menu_TrayIcon, -1, 1);
Mnu.Caption = "TestJScript";
Mnu.UseScript = Script.ScriptPath;
Mnu.OnClickFunc = "ShowIt";
Mnu.IconIndex = 35;
}
function ShowIt()
{
SDB.MessageBox(SDB.Localize("ShowIt function called correctly."), mtError, mbOk);
}
Error reported is:
"Error #1032 - Microsoft VBScript compilation error"
Now I'm not sure this is a bug - (the scripting.doc file has a section titled "Automatically called Scripts" that states:
But I really want to get on with some MediaMonkey Scripting and VBScript sucks the creativity out of me."All .vbs scripts in Scripts\Auto folder are automatically checked during MM start-up and in case there is ‘OnStartup’ procedure present, it is called"
Please consider fixing this - It'll definitely be worth your while.