What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Away Talker

[Request] Away Talker
Author: Message:
Paril
Junior Member
**

Avatar
Admin of Paril's Projects

Posts: 69
30 / Male / Flag
Joined: Jul 2006
O.P. [Request] Away Talker
Hey.. Me again.

Anyway, I'm trying to get this script to say "Hey" when someone says "Hi".. any ideaS? I tried this:


var IsItOn;
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage)
{   
    if(sMessage == "*PtalkOn")
    {
        IsItOn = true;
        return "";
    }
    if(sMessage == "*PtalkOff")
    {
        IsItOn = false;
        return "";
    }
}
function OnEvent_ChatWndRecieveMessage(pChatWnd, Origin, sMessage, MessageKind)
{   
    MessageKind = 1;

    if (IsItOn)
    {
        if (sMessage == "Hi")
            SendMessage ("Hey!");
        return sMessage;
    }
    else
        return sMessage;
}




No dice.


-Paril
07-06-2006 08:40 PM
Profile E-Mail PM Web Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: [Request] Away Talker
Try this script. There should be an english translation somewhere, but I can't find it.
07-06-2006 09:13 PM
Profile E-Mail PM Find Quote Report
absorbation
Elite Member
*****

Avatar

Posts: 3636
Reputation: 81
– / Male / Flag
Joined: Feb 2005
RE: [Request] Away Talker
Easy peasy lemon squency:

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
   return Message.replace("Hey", "HI");
}
07-06-2006 09:15 PM
Profile PM Find Quote Report
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
37 / – / –
Joined: Dec 2005
RE: [Request] Away Talker
Here is working code :)
code:
var IsItOn = 0;

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
  if(Message.substr(0,8) == "*PtalkOn")
  {
    IsItOn = 1;
    return "";
  }
  if(Message.substr(0,9) == "*PtalkOff")
  {
    IsItOn = 0;
    return "";
  }
}

function OnEvent_ChatWndReceiveMessage(chatwnd, sOrigin, sMessage, nMessageKind)
{
if (sMessage.substr(0,2) == "Hi" || sMessage.substr(0,2) == "hi")
{
  if (IsItOn == 1)
  {
    pChatWnd.SendMessage("Hey!");
  } else {
    Debug.trace("IsItOns value is " + IsItOn + ", not 1, message not sent");
  }
} else {
  Debug.trace("Message is " + sMessage + ", not Hi or hi, nothing done.");
}
}


Let me know if it doesn't work.

Cloudy
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6715 days, 13 hours, 29 minutes ago
07-07-2006 01:20 AM
Profile E-Mail PM Find Quote Report
cooldude_i06
Full Member
***

Avatar
I'm so cool I worry myself.

Posts: 272
Reputation: 9
– / Male / –
Joined: Sep 2003
RE: [Request] Away Talker
quote:
Originally posted by absorbation
Easy peasy lemon squency:

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
   return Message.replace("Hey", "HI");
}


He was asking for sending a message when certain text was received, not replacing certain text in outgoing messages. :P

This post was edited on 07-07-2006 at 01:32 AM by cooldude_i06.
[Image: clb2.jpg]
07-07-2006 01:25 AM
Profile E-Mail PM Web Find Quote Report
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: [Request] Away Talker
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, sOrigin, sMessage, nMessageKind) {
if(sOrigin == Messenger.MyName) return sMessage;
if (sMessage.search(/^hi$/i)) {
  if (IsItOn)
    ChatWnd.SendMessage("Hey!");
}

Better function

This post was edited on 07-07-2006 at 03:01 AM by Silentdragon.
07-07-2006 01:40 AM
Profile E-Mail PM Web Find Quote Report
S4mP410
Junior Member
**

Avatar

Posts: 18
Joined: Jul 2006
RE: [Request] Away Talker
Doesn't work here :undecided:
07-07-2006 02:31 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


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