Shoutbox

Quick question + suggestion for MP!L - 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: Quick question + suggestion for MP!L (/showthread.php?tid=84495)

Quick question + suggestion for MP!L by evolution on 06-24-2008 at 02:47 AM

Ok I'm developing a script to add a quick BRB function, but since I'm new to Messenger Plus! scripting I'm not sure on a few things.

1) Is there a function to send a message to all open conversations?
2) How do you set a command eg. /command
3) Is there a function to do something on the unlocking of MSN?

Thanks. :)

And for the suggestion, I think there should be an option for when you lock MSN when you go to unlock it you have to enter your MSN password.


RE: Quick question + suggestion for MP!L by matty on 06-24-2008 at 03:05 AM

quote:
Originally posted by evolution
1) Is there a function to send a message to all open conversations?
code:
for ( var oChatWnd = new Enumerator(Messenger.CurrentChats); !oChatWnd.atEnd(); oChatWnd.moveNext() ) {
    if ( oChatWnd.EditChangeAllowed === true ) oChatWnd.SendMessage('this is some text');
}
quote:
Originally posted by evolution
2) How do you set a command eg. /command
code:
function OnGetScriptCommands () {
    return '<ScriptCommands><Command><Name>command</Name><Description>this is my command</Description></Command></ScriptCommands>';
}
quote:
Originally posted by evolution

3) Is there a function to do something on the unlocking of MSN?
code:
function OnEvent_MessengerLocked() {
    // do stuff here
}

function OnEvent_MessengerUnlocked() {
    // do stuff here
}


RE: RE: Quick question + suggestion for MP!L by evolution on 06-24-2008 at 03:15 AM

Thanks mate! That was quicker than I expected. :D

Just one question:
Where do I actually put what I want the command to do?

quote:
function OnGetScriptCommands () {
    return '<ScriptCommands><Command><Name>command</Name><Description>this is my command</Description>Here?</Command></ScriptCommands>';
}

RE: Quick question + suggestion for MP!L by Matti on 06-24-2008 at 07:45 AM

The OnGetScriptCommands() event is just so that the command is displayed in the box when you type "/" in a chat window. You should parse the command yourself through the OnEvent_ChatWndSendMessage event.

For a great example of a command parser, have a look at CookieRevised's reply to Gettin data from "/" commands and markee's reply to Gettin data from "/" commands. :)


RE: Quick question + suggestion for MP!L by NanaFreak on 06-24-2008 at 08:03 AM

quote:
Originally posted by evolution
And for the suggestion, I think there should be an option for when you lock MSN when you go to unlock it you have to enter your MSN password.
cant be done because plus cannot access you msn password... sorry
RE: Quick question + suggestion for MP!L by Basilis on 06-24-2008 at 08:14 AM

quote:
Originally posted by evolution
And for the suggestion, I think there should be an option for when you lock MSN when you go to unlock it you have to enter your MSN password.

There is an option asking you if you want to have a code to unlock MSN or not. You can have your MSN password code if you want or anything else so there is such an option but it lets you put any code you like and not just your MSN password. :)
RE: Quick question + suggestion for MP!L by Chancer on 06-24-2008 at 08:55 PM

quote:
Originally posted by NanaFreak
quote:
Originally posted by evolution
And for the suggestion, I think there should be an option for when you lock MSN when you go to unlock it you have to enter your MSN password.
cant be done because plus cannot access you msn password... sorry
But maybe a script that stores another password and asks it when you unlock.
RE: Quick question + suggestion for MP!L by CookieRevised on 06-25-2008 at 06:55 AM

quote:
Originally posted by Chancer
But maybe a script that stores another password and asks it when you unlock.
Not needed. You can already set a password for when you use the unlock feature of Messenger Plus!.

Plus! > Preferences > Messenger > Messenger Lock > When unlocking Messenger: ask for password to unlock
RE: Quick question + suggestion for MP!L by Chancer on 06-25-2008 at 09:51 PM

quote:
Originally posted by CookieRevised
Not needed. You can already set a password for when you use the unlock feature of Messenger Plus!.

Plus! > Preferences > Messenger > Messenger Lock > When unlocking Messenger: ask for password to unlock
That's true. I've never noticed that.