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:
vSanjo
New Member
*

Poookeemoonn~

Posts: 5
33 / Male / Flag
Joined: Jan 2010
O.P. RE: Nudge Open Chats
I managed to make it work to a degree.
code:
function OnGetScriptMenu(Location)
{
    var ScriptMenu = "<ScriptMenu>";
    ScriptMenu += "<MenuEntry Id=\"nudgeall\">Nudge All</MenuEntry>";
    ScriptMenu += "</ScriptMenu>";
    return ScriptMenu;
}

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


It sends a nudge to everyone, but if n is the amount of open chats, it does n*nudges to each chat.
Any way to fix this?

Edit: At first, I thought it was counting the nudges across chats, but if you change /nudge to like.. 'Rawr', it'll send n*rawr to each chat.

Edit 2:

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

function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd)
{
    if(MenuItemId == "nudgeall")
    {
        if (Messenger.MyEmail == "sanjo@mapletip.com")
        {
            for (var oChat =  new Enumerator(Messenger.CurrentChats); !oChat.atEnd();  oChat.moveNext())
            {
                Debug.Trace(oChat.item().Handle);

                OriginWnd.SendMessage("/nudge");
            }
        }

        if (Messenger.MyEmail != "sanjo@mapletip.com")
        {
            OriginWnd.SendMessage("Not authorized!");
        }
    }
}


I just removed the red.
See.. I was mixed up on 2 plans. 1 was to send /all /nudge to a single chat through a button, or /nudge to each contact through a button that goes through each chat.
I'm so silly.

This post was edited on 02-02-2010 at 02:54 PM by vSanjo.
02-02-2010 01:58 PM
Profile E-Mail PM Web 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