Using the gen_scripting plugin for Winamp you must instantiate the object. In VBS this is
Set winamp = CreateObject("gen_scripting.WinAmp")
However, I'm pretty sure that the same plug-in can be used to script Winamp using Jscript (or possibly even Javascript - a better choice for me). So, I've tried
var winamp = Object.create("gen_scripting.WinAmp");
x = winamp.GetVersion();
alert(x);
winamp.ButtonPlay;
Only that doesn't work. Any help to get me started would be appreciated
JScript analog of VBScript CreateObject()
is new ActiveXObject()
.
Also, alert
is a browser-specific function; in Windows shell scripts you should use WScript.Echo
.
var winamp = new ActiveXObject("gen_scripting.WinAmp");
var x = winamp.GetVersion();
WScript.Echo(x);
winamp.ButtonPlay();