What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Need Help with my First Script

Need Help with my First Script
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Need Help with my First Script
quote:
Originally posted by SamV522
Ok. So I've tried quite a few different things with sending a response, but it crashes whenever I try and send a message...
What am I doing wrong?
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Origin, Message, MessageKind){
    if (Message.substr(0,6).toLowerCase() == "/AwayI"){
        var param = Message.substr(7);
        switch(param){
            case "enable":
                AI.State = true;
                break;
            case "disable":
                AI.State = false;
                break;
            case "commands":
                alert("Enable\nDisable\nCommands");
                break;
            /*default:
                alert("Invalid Command! Type \"/AwayI Commands\" to see a list of valid commands");
                break;
                */
        }
    }
}



Unless alert is your own custom function, it will fail. MP!L doesn't have an alert function. You can call a msgbox by using the relevant Win32 APIs or you can use Debug.Print to see it in the debug area. It shouldn't crash though, unless you just mean theres an error...

EDIT: Too slow, had to read other tabs first ¬_¬

This post was edited on 11-24-2009 at 06:25 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
11-24-2009 06:25 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Need Help with my First Script - by SamV522 on 11-24-2009 at 04:54 PM
RE: Need Help with my First Script - by SourSpud on 11-24-2009 at 04:58 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 05:00 PM
RE: Need Help with my First Script - by SourSpud on 11-24-2009 at 05:02 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 05:12 PM
RE: Need Help with my First Script - by CookieRevised on 11-24-2009 at 05:14 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 05:43 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 06:10 PM
RE: Need Help with my First Script - by matty on 11-24-2009 at 06:20 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 06:24 PM
RE: Need Help with my First Script - by Spunky on 11-24-2009 at 06:25 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 06:32 PM
RE: Need Help with my First Script - by matty on 11-24-2009 at 06:53 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 07:16 PM
RE: Need Help with my First Script - by matty on 11-24-2009 at 07:19 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 07:23 PM
RE: Need Help with my First Script - by SamV522 on 11-24-2009 at 07:55 PM
RE: Need Help with my First Script - by Spunky on 11-24-2009 at 08:00 PM
RE: Need Help with my First Script - by matty on 11-24-2009 at 08:29 PM
RE: Need Help with my First Script - by CookieRevised on 11-24-2009 at 08:35 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