What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Please help. (making a bot ask a question)

Please help. (making a bot ask a question)
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Please help.
code:
function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nMessageKind){
    if (sOrigin != Messenger.MyName){ //Check if the person who sent the message is the bot or not
        if (sMessage.toLowerCase() == 'yes'){ //Check if the contact said yes
            pChatWnd.SendMessage('this is a message sent'); // Send a message or the question again
        }
    }
}

No offence but what I told you is pseudo code your supposed to be able to take what I say and turn it into code. Its not hard to do.

PM
quote:
On Today at 05:54 PM, Gran_PC wrote:
Now any message is the message of the question... Please help...
I suggest using a BOOL variable setting it to true if a question is asked then your code would look like this :

code:
var blnIsQuestionAsked = false;

function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nMessageKind){
    if (sOrigin != Messenger.MyName){ //Check if the person who sent the message is the bot or not
        if (sMessage.toLowerCase() == 'yes'){ //Check if the contact said yes
            if (blnIsQuestionAsked == true){ //Check if the contact said yes
                pChatWnd.SendMessage('this is a message sent'); // Send a message or the question again
            }
        }
    }
}

Again this is basic programming we can't keep giving you the answers this should be knowledge you should know already.

This post was edited on 07-10-2006 at 08:34 AM by surfichris.
07-09-2006 09:50 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Please help. (making a bot ask a question) - by Gran_PC on 07-09-2006 at 09:21 PM
RE: Please help. - by J-Thread on 07-09-2006 at 09:26 PM
RE: RE: Please help. - by Gran_PC on 07-09-2006 at 09:26 PM
RE: Please help. - by matty on 07-09-2006 at 09:29 PM
RE: Please help. - by Gran_PC on 07-09-2006 at 09:30 PM
RE: Please help. - by matty on 07-09-2006 at 09:39 PM
RE: RE: Please help. - by Gran_PC on 07-09-2006 at 09:41 PM
RE: Please help. - by ddunk on 07-09-2006 at 09:40 PM
RE: Please help. - by matty on 07-09-2006 at 09:50 PM
RE: Please help. (making a bot ask a question) - by Gran_PC on 07-10-2006 at 08:30 AM
RE: Please help. (making a bot ask a question) - by Paril on 07-10-2006 at 08:33 AM


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