What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » A little advice

A little advice
Author: Message:
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. A little advice
Hey guys.
I don't really want to do this, but I've been playing about for ages and can't come up with a suitable solution.

I have an XBMC script running, which changes my music whenever a broadcast is detected.  All f this is working fine (well, kinda), but I'm looking to add a status changer to it.
All I need is some solution so that when the media is set, it saves my status, and then sets me to busy, then when the media stops it sets it back to the original status.

I know that this should be easy enough, but I keep running into problems when the next song in a playlist begins, the status variable changes again, and so in the end, unless I play only 1 song/video, the status will just remain as busy.

I need a way to stop this from happening, while still only calling from the same functions.
eg.
When media starts/changes it is detected  and sets the media
When media stops the media is turned off

Any ideas would be hugely appreciated.
Cheers guys
[Image: adsig.jpg]
11-05-2007 02:07 AM
Profile E-Mail PM Web Find Quote Report
phalanxii
Full Member
***


Posts: 146
Reputation: 5
32 / Male / Flag
Joined: Aug 2006
Status: Away
RE: A little advice
code:
function OnEvent_MyMediaChange(NewMedia) {
    var BlankMedia = "\\0Music\\00\\0\\0\\0\\0\\0\\0";
    if(NewMedia == "" || NewMedia == BlankMedia) {
        Debug.Trace("Media is now off.");
    } else if(Messenger.MyCurrentMedia == "" || Messenger.MyCurrentMedia == BlankMedia) {
        Debug.Trace("Media is now on.");
    }
}
Be aware that this event often contains a slight delay from when the media appears to be updated.

I hope this is what you wanted. This will catch when your media turns on, and when your media turns off, but not when your media changes.

This post was edited on 11-05-2007 at 02:53 AM by phalanxii.
11-05-2007 02:52 AM
Profile PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. RE: A little advice
That works absolutely perfectly phalaxii, thanks very much.
The delay only appears to occur when the media is stopped, so it actually works as a minor benefit to my script.
Very much appreciated :D
[Image: adsig.jpg]
11-05-2007 04:09 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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