Shoutbox

Missing Something Small...Help Please? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Missing Something Small...Help Please? (/showthread.php?tid=69798)

Missing Something Small...Help Please? by Black_Ice on 12-22-2006 at 12:46 AM

Hey Guys,
Just wondering if any of you could help me with this. I know what I'm trying to do is very simple! But for some reason it just won't work?

I want to use the MsgPlus.MessengerIsLocked property to run some code determined on whether or not MP!L is locked or not.

code:
function OnEvent_MyStatusChange(){
   
    if (MsgPlus.MessengerIsLocked = 0) {
        //If Messenger isn't locked execute code
        }
}

I have tried everything:

code:
(MsgPlus.MessengerIsLocked = 0)
(MsgPlus.MessengerIsLocked == 0)
(MsgPlus.MessengerIsLocked === '0')
(MsgPlus.MessengerIsLocked === "False")
(MsgPlus.MessengerIsLocked === 'False')

And numerous others that follow similar syntax.

The code that executes works and I know this because I put it outside the
code:
if (MsgPlus.MessengerIsLocked = 0) {

Cycle and it worked fine. Sorry for the newb question but I really can't figure it out!

Thanks for any help,

Black Ice
RE: Missing Something Small...Help Please? by Weyzza on 12-22-2006 at 01:03 AM

try: MsgPlus.MessengerIsLocked == false, since it returns a boolean.


RE: Missing Something Small...Help Please? by Black_Ice on 12-22-2006 at 01:06 AM

Thanks very much!
Ah now I remember using that once before in a previous script. It worked though, thanks Weyzza!


RE: Missing Something Small...Help Please? by Silentdragon on 12-22-2006 at 02:00 AM

Better yet, just do

code:
if(!MsgPlus.MessengerIsLocked) {
}

(! means false if you didn't know)
RE: Missing Something Small...Help Please? by Black_Ice on 12-22-2006 at 02:16 AM

Ah that's just like php's syntax. Thanks Silentdragon, very neat :wink: