quote:
Originally posted by uggi
you donīt understand what i want it to do
You want the script to trigger on your contact's machine only. If that's wrong, then please explain why.
quote:
Originally posted by mlevit
Uggi i think i might have got it.
code:
var sendingMessage = "";
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
sendingMessage = Message;
return Message;
}
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
if (Message == sendingMessage)
{
//Do nothing
}
else
{
//Your code here
}
}
Im not sure but i think this is what you're trying to achive?
It is, but it's an ugly way to do it. The better (and documented) way is:
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
if (Origin != Messenger.MyName) // Rejects your own messages
{
// Do stuff here
}
}
This code block will only respond to the command if it was sent by someone other than yourself. This test is suggested in the Plus! documentation (and quoted several times above), and given you always compare the Origin to your
current display name, it should be practically faultless.
I've also taken the liberty of simplifying the if{} construct to remove the unnecessary else {} clause.
There's only one thing that will bring this solution down: if your contact has the same display name as you. Which, let's face it, is very rare.
quote:
Originally posted by uggi
your behaviour and mood is rather than good
I just get frustrated when I'm making things clear, yet people don't get it. Well, I've now posted a full code sample, so hopefully it's irrevocably clear now
quote:
Originally posted by uggi
Forget this question
No