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

Author: Message:
Hamburger
New Member
*


Posts: 3
Joined: Sep 2008
O.P.
Hallo zusammen,

Mein erstes Script und gleich 2 mittelschwere Probleme.


Die Funktion startet nicht wie sie sollte nur beim Empfangen sondern auch beim senden. Das aber auch nicht nur einmal sondern direkt mehrfach. Im Anhang findet ihr das Debuglog + Script.

code:
Starte Script
Scriptende erreicht
Skript wurde geladen und ist bereit
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht
Sende Nachricht


code:
Debug.DebuggingWindowVisible = true

Debug.Trace("Starte Script");

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
    Debug.Trace("Sende Nachricht");
    ChatWnd.SendMessage("Das ist cool !");
}

Debug.Trace("Scriptende erreicht");


Bitte um Rat *-)
09-28-2008 03:47 PM
Profile E-Mail PM Find Quote Report
djdannyp
Elite Member
*****

Avatar
Danny <3 Sarah

Posts: 3546
Reputation: 31
37 / Male / Flag
Joined: Mar 2006
Please post in English on these forums, as more people will be able to understand (and help) your request
[Image: 1ftt0hpk-signature.png]
AutoStatus Script || Facebook Status Script
5233 days, 13 hours, 10 minutes, 44 seconds ago
09-28-2008 04:10 PM
Profile E-Mail PM Find Quote Report
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
36 / Male / Flag
Joined: Jul 2007
Hallo Hamburger,

zu Beginn ein Tipp: dies ist ein vorwiegend englisches Forum. Du wirst also mehr Erfolg haben wenn du Anfragen auf Englisch formulierst...

Du musst innerhalb der Funktion OnEvent_ChatWndReceiveMessage prüfen, ob der Absender der Nachricht (in der Variablen Origin) du selbst bist. In diesem Fall solltest du keine automatische Antwort versenden.
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
    if (Origin == Messenger.MyName) {
        return;
    }
    Debug.Trace("Sende Nachricht");
    ChatWnd.SendMessage("Das ist cool !");
}

Hello Hamburger,

for first, a tip: this is a mostly English forum. You will thus have more success if you type postings in English...

Within the function OnEvent_ChatWndReceiveMessage, you have to check if the sender of the message (in the variable Origin) is you yourself. In this case, you shouldn't send an automatic reply.
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind) {
    if (Origin == Messenger.MyName) {
        return;
    }
    Debug.Trace("Sending message");
    ChatWnd.SendMessage("This is cool !");
}
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
09-28-2008 04:32 PM
Profile E-Mail PM Web Find Quote Report
Hamburger
New Member
*


Posts: 3
Joined: Sep 2008
O.P.
Danke so funktioniert es perfekt ;) kannst Du mir auch noch sagen wie ich auf den Empfänger zugreife?

Thanks, but how do I get the receivers?
09-28-2008 06:02 PM
Profile E-Mail PM Find Quote Report
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
36 / Male / Flag
Joined: Jul 2007
You always get a ChatWnd object. That object has a sub-object that you can iterate, "Contacts". Each item in the iteration is an object of the type "Contact". This object has several properties, like Email or Name.
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
09-29-2008 10:45 AM
Profile E-Mail PM Web Find Quote Report
Hamburger
New Member
*


Posts: 3
Joined: Sep 2008
O.P.
Perfectly, Thanx :D

This post was edited on 09-30-2008 at 02:01 AM by Hamburger.
09-30-2008 12:40 AM
Profile E-Mail PM 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