What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help - I'm new to scripting!

Help - I'm new to scripting!
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. Huh?  Help - I'm new to scripting!
I've just started working on an "Instant Response" script, that can send a message or a /command after someone says something to you.  But I have a few problems since I am very new to this:

1) I don't know how to make an enable/disable option (for chat windows and the contact list) in the script option menu.
2) I don't know how to make an options screen, to change the delay and message, either!

If anyone can give me the basic code for it, I would really appreciate it.  :D

I have attached the script file in the message below, and as an attachment (in script format - ".js").


jscript code:
var SettingMessage;
var SettingTimer;

function OnEvent_Initialize(MessengerStart)
{
    SettingMessage = "/nudge";
    SettingTimer = 100;
}

function OnEvent_Timer(TimerID)
{
    Debug.Trace("Timer launched");
    Messenger.OpenChat(TimerID).SendMessage(SettingMessage);
}

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
    if (Origin != Messenger.MyName) {
    Debug.Trace("Message received");
    var Contacts = ChatWnd.Contacts;
    var e = new Enumerator(Contacts);
    for(; !e.atEnd(); e.moveNext()) {
        var Contact = e.item();
        Debug.Trace(" " + Contact.Email);
    }
    if (Message != SettingMessage)
    {
    var Contacts = ChatWnd.Contacts;
    var e = new Enumerator(Contacts);
    var NoContacts = 0;
    for(; !e.atEnd(); e.moveNext()) {
        var Contact = e.item();
        Debug.Trace(" " + Contact.Email);
        NoContacts = NoContacts + 1;
    }
    Debug.Trace(NoContacts);
    if (NoContacts == 1) {
        MsgPlus.AddTimer(Contact.Email, SettingTimer);
        Debug.Trace("Timer started");
    }
    }
    }
}
11-15-2008 03:12 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help - I'm new to scripting! - by whiz on 11-15-2008 at 03:12 PM
RE: Help - I'm new to scripting! - by matty on 11-25-2008 at 04:31 PM
RE: Help - I'm new to scripting! - by whiz on 11-26-2008 at 08:16 PM
RE: Help - I'm new to scripting! - by matty on 11-26-2008 at 08:23 PM
RE: Help - I'm new to scripting! - by whiz on 11-26-2008 at 09:01 PM
RE: Help - I'm new to scripting! - by matty on 11-27-2008 at 02:29 PM
RE: Help - I'm new to scripting! - by whiz on 11-27-2008 at 07:37 PM
RE: Help - I'm new to scripting! - by matty on 11-27-2008 at 07:38 PM
RE: Help - I'm new to scripting! - by whiz on 12-07-2008 at 11:25 AM
RE: Help - I'm new to scripting! - by Matti on 12-07-2008 at 11:29 AM
RE: RE: Help - I'm new to scripting! - by NanoChromatic on 12-07-2008 at 11:36 AM
RE: Help - I'm new to scripting! - by Matti on 12-07-2008 at 12:26 PM
RE: RE: Help - I'm new to scripting! - by NanoChromatic on 12-07-2008 at 02:08 PM
RE: Help - I'm new to scripting! - by whiz on 12-07-2008 at 04:06 PM
RE: RE: Help - I'm new to scripting! - by Jesus on 12-08-2008 at 12:39 AM
RE: Help - I'm new to scripting! - by whiz on 12-08-2008 at 07: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