What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Nudge Open Chats

Nudge Open Chats
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Nudge Open Chats
This is happening because the OriginWnd parameter of the OnEvent_MenuClicked event is the Chat Window where the menu is clicked. This will never change unless you click the menu from another Chat Window.

You would need to use:
js code:
oChat.item().SendMessage('/nudge');

But you also want to make sure that you can send the message to begin with:

js code:
function OnGetScriptMenu(Location) {
    return '<ScriptMenu><MenuEntry Id="nudgeall">Nudge All</MenuEntry></ScriptMenu>';
}

function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd) {
    if (Messenger.MyEmail === 'sanjo@mapletip.com') {
        if(MenuItemId === "nudgeall") {
            for (var oChat =  new Enumerator(Messenger.CurrentChats); !oChat.atEnd();  oChat.moveNext()) {
                if (oChat.item().EditChangeAllowed === true) {
                    oChat.item().SendMessage('/nudge');
                }
            }
        }
    }
    else {
        OriginWnd.SendMessage('Not authorized!');
    }
}

This post was edited on 02-02-2010 at 02:51 PM by matty.
02-02-2010 02:49 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Nudge Open Chats - by vSanjo on 02-01-2010 at 03:18 PM
RE: Nudge Open Chats - by matty on 02-01-2010 at 03:28 PM
RE: Nudge Open Chats - by vSanjo on 02-01-2010 at 03:44 PM
RE: Nudge Open Chats - by Mnjul on 02-01-2010 at 05:09 PM
RE: Nudge Open Chats - by Matti on 02-01-2010 at 05:16 PM
RE: Nudge Open Chats - by vSanjo on 02-01-2010 at 11:35 PM
RE: Nudge Open Chats - by matty on 02-02-2010 at 12:31 AM
RE: Nudge Open Chats - by vSanjo on 02-02-2010 at 01:58 PM
RE: Nudge Open Chats - by matty on 02-02-2010 at 02:49 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