Well I am using a DLL to do it, but here you go...
SCRIPT:
code:
var Shell = new ActiveXObject("WScript.Shell");
var MyActiveXObject = new ActiveXObject('RSP2MusicDLL.clsRSP2Music');
Shell.RegRead(MsgPlus.ScriptRegPath + "RSPpath");
var path = Shell.RegRead(MsgPlus.ScriptRegPath + "RSPpath");
var start = Shell.RegRead(MsgPlus.ScriptRegPath + "RSPenable");
if(start == -1)
{
MyActiveXObject.SetPath(path);
MsgPlus.AddTimer("RefreshTimer", 2000);
}
DLL:
Global Vars:
code:
Dim DB As Database
Dim RS As Recordset
Load Precedure:
code:
Public Sub SetPath(strPath As String)
'Setup database settings
Set DB = OpenDatabase(strPath)
Set RS = DB.OpenRecordset("SELECT * FROM OnAir ORDER BY FullName ", dbOpenDynaset)
End Sub
The line that it errors on is in the timer, which is...
code:
var RSPArtist = MyActiveXObject.GetRSPArtist();