What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Problem with ActiveWinamp

Problem with ActiveWinamp
Author: Message:
Sh4wn
New Member
*


Posts: 14
Joined: Jul 2006
O.P. Problem with ActiveWinamp
Hi,

I'm trying to create a winamp msn control, with the ActiveWinamp plugin voor winamp.

The plugin creates a COM object named ActiveWinamp.Application So i'm trying this:

code:

var winamp;
var playlist;
var shell;

function OnEvent_Initialize(MessengerStart)
{
    try
    {
        winamp = new ActiveXObject('ActiveWinamp.Application');
    }
    catch (e)
    {
        Debug.Trace("Could not create winamp Object");
        MsgPlus.DisplayToast("MSN Winamp", "Could not create winamp object. Have you installed ActiveWinamp?\n\nClick here to install Active Winamp", "", "OnWinampErrorToastClick");
    }
   
    shell = new ActiveXObject('WScript.Shell');   
   
    var x;
    for(x in winamp)
    {
        Debug.Trace(x);
    }

    // So far, so good. Ik get no errors
    // But in my script debugger, I also get 0 properties
    // (See for loop above)
}

function OnEvent_Uninitialize(MessengerExit)
{
}

function OnWinampErrorToastClick(param)
{
    shell.Run("http://www.myplugins.info/activewinamp");
}

function OnGetScriptMenu()
{
    return "<ScriptMenu><MenuEntry Id='MenuCurrentSong'>Send Current Song</MenuEntry></ScriptMenu>";
}

function OnEvent_MenuClicked(id, Location, wnd)
{
    if(id == "MenuCurrentSong")
    {
        wnd.SendMessage(winamp.playlist[winamp.playlist.position].ATFSTring("[%artist% - ]$if2(%title%,$filepart(%filename%))"));
        // At the line above, I get an error. winamp.playlist[...] is null or something
    }
}


I get no error when the object is created, but the object has no properties...

Does anybody know what the problem can be?

This post was edited on 08-14-2006 at 04:05 PM by Sh4wn.
08-14-2006 02:16 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Problem with ActiveWinamp - by Sh4wn on 08-14-2006 at 02:16 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On