Automatically called scripts can't be JScript
Posted: Thu Sep 28, 2006 5:43 am
				
				As discussed in a previous post we can't use JScript to code scripts in the auto folder.
To Reproduce:
create a file called, say, testJScript.js in the MediaMonkey/scripts/auto folder and past the following code into it:
Restart MediaMonkey, right click on the mediamonkey tray icon and select the new "TestJScript" menu item.
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:
Please consider fixing this - It'll definitely be worth your while.
			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.

 .
 .