What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Question] Now playing/Display picture.

[Question] Now playing/Display picture.
Author: Message:
can16358p
Junior Member
**

WLM + MP!L User

Posts: 58
34 / Male / –
Joined: Oct 2005
Status: Away
RE: [Question] Now playing/Display picture.
I had a half built code, I've edited it a bit more and this is more reliable. Just a simple solution, but at least a solution, and works absolutely great with me!

code:
//Music DP by can16358p
//Make your Display Picture the cover of the album of the song you are listening to!
//Edit the path to your My Music folder
//For any reason, if another filename is used for album arts instead of folder.jpg, change it there
//Tested with Windows Media Player 11, but should work with any configuration that has the songs and the album art file in My Music/Artist/Album/
//Do anything you want with this code. Play with it, change things in it.
var initial="";
var path="D:/Documents/My Music/";
var imgfile="";
var imgname="folder.jpg";
var name="";
var artist="";
var album="";
var id="";
var existcheck=new ActiveXObject("Scripting.FileSystemObject");
var sinfo="<ScriptMenu>"
sinfo+="<MenuEntry Id=\"mddp\">Make current DP default</MenuEntry> ";
sinfo+="</ScriptMenu>";

function OnEvent_Initialize(MessengerStart){
    initial=Messenger.MyDisplayPicture;
    Debug.trace("Script Started!");
    Debug.trace("Default DP: "+initial);
}

function OnEvent_MenuClicked(id,loc,orig){
    if(id=="mddp"){
        initial=Messenger.MyDisplayPicture;
        Debug.trace("Default DP Updated.");
        Debug.trace("Default DP: "+initial);    }
}

function OnGetScriptMenu(loc){
    return sinfo;
}

function OnEvent_Signin(mailaddrr){
    var initial=Messenger.MyDisplayPicture;
    Debug.trace("Initial Image is: "+initial);
    if(Messenger.MyStatus>=3){
        makedp(Messenger.MyCurrentMedia);
    }
}

function OnEvent_Uninitialize(MessengerExit)
{
    Messenger.MyDisplayPicture=initial;
}

function OnEvent_MyMediaChange(newsong){
    makedp(newsong);
}
function makedp(str){
    str=str.substring(str.indexOf("{1}\\0")+5);
    song=str.substring(0,str.indexOf("\\0"));
    str=str.substring(str.indexOf("\\0")+2);
    artist=str.substring(0,str.indexOf("\\0"));
    str=str.substring(str.indexOf("\\0")+2);
    album=str.substring(0,str.indexOf("\\0"));
    str=str.substring(str.indexOf("\\0")+2);
    id=str.substring(0,str.indexOf("\\0"));
    str=str.substring(str.indexOf("\\0")+2);
    imgfile=path+artist+"/"+album+"/"+imgname;
    if(existcheck.FileExists(imgfile) && song!=""){
        Debug.trace("Artist: "+artist+", Song: "+song+", Album: "+album);
        Messenger.MyDisplayPicture=path+artist+"/"+album+"/"+imgname;
    }else{
        Debug.trace("File not found! Changing DP to "+initial);
        Messenger.MyDisplayPicture=initial;
    }
}

[Image: anathema.gif][Image: hax0r.png]
06-29-2006 10:47 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Question] Now playing/Display picture. - by Eisenkanzler on 06-29-2006 at 11:21 AM
RE: [Question] Now playing/Display picture. - by rob_botch on 06-29-2006 at 11:59 AM
RE: [Question] Now playing/Display picture. - by geeksada on 06-29-2006 at 12:01 PM
RE: [Question] Now playing/Display picture. - by rob_botch on 06-29-2006 at 12:04 PM
RE: RE: [Question] Now playing/Display picture. - by Eisenkanzler on 06-29-2006 at 01:26 PM
RE: [Question] Now playing/Display picture. - by rob_botch on 06-29-2006 at 01:30 PM
RE: [Question] Now playing/Display picture. - by Eisenkanzler on 06-29-2006 at 01:38 PM
RE: [Question] Now playing/Display picture. - by MGrove03 on 06-29-2006 at 01:50 PM
RE: RE: [Question] Now playing/Display picture. - by alexp2_ad on 06-29-2006 at 05:37 PM
RE: [Question] Now playing/Display picture. - by can16358p on 06-29-2006 at 05:46 PM
RE: [Question] Now playing/Display picture. - by cirix on 06-29-2006 at 06:50 PM
RE: [Question] Now playing/Display picture. - by cirix on 06-29-2006 at 06:54 PM
RE: [Question] Now playing/Display picture. - by Ža7oŽ on 06-29-2006 at 07:39 PM
RE: [Question] Now playing/Display picture. - by Voldemort on 06-29-2006 at 08:11 PM
RE: RE: [Question] Now playing/Display picture. - by alexp2_ad on 06-30-2006 at 09:00 AM
RE: [Question] Now playing/Display picture. - by noroom on 06-29-2006 at 08:13 PM
RE: [Question] Now playing/Display picture. - by can16358p on 06-29-2006 at 08:17 PM
RE: [Question] Now playing/Display picture. - by cirix on 06-29-2006 at 08:50 PM
RE: [Question] Now playing/Display picture. - by can16358p on 06-29-2006 at 10:47 PM
RE: [Question] Now playing/Display picture. - by -dt- on 06-29-2006 at 11:07 PM
RE: [Question] Now playing/Display picture. - by noroom on 06-30-2006 at 06:57 AM
RE: [Question] Now playing/Display picture. - by giken on 06-30-2006 at 08:13 AM
RE: [Question] Now playing/Display picture. - by Eisenkanzler on 06-30-2006 at 09:52 AM
RE: [Question] Now playing/Display picture. - by noroom on 06-30-2006 at 11:25 AM
RE: RE: [Question] Now playing/Display picture. - by Eisenkanzler on 06-30-2006 at 01:48 PM
RE: [Question] Now playing/Display picture. - by Veggie on 06-30-2006 at 12:06 PM
RE: [Question] Now playing/Display picture. - by cirix on 06-30-2006 at 05:34 PM
RE: [Question] Now playing/Display picture. - by noroom on 07-01-2006 at 01:18 AM
RE: [Question] Now playing/Display picture. - by robochief on 07-01-2006 at 04:07 AM


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