Shoutbox

Retrieving friendly name of contact who sends action - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Retrieving friendly name of contact who sends action (/showthread.php?tid=51862)

Retrieving friendly name of contact who sends action by can16358p on 10-16-2005 at 07:13 PM

I have a very small c++ knowledge but still can make some small things with it.

In my plugin, if you write a command that start with /x, users on your list with this plugin are notified with a toast that you did this, making this is very simple as you all know :)

But I have three problems;
1. The same notification comes to me too, which I don't want.
2. I just use a specific string for example "Mary has typed the command!", but I want to retrieve this person's friendly name and use it in that toast. (the main reason I opened this topic) How do I retrieve the friendly name of my contact that sent this command to me?
3. When I click the toast, I want to open convo with that person, just like in the way you click when someone sends a message or signs in.


RE: Retrieving friendly name of contact who sends action by Dempsey on 10-16-2005 at 08:52 PM

1.  -  I'd have a boolean, which I set to true at the beginning of the ParseCommand and before showing the notification, check if the boolean value is false and if it is you know it's running from the computer that sent the command.

2.  -  You need to use the Messenger API to do that, look at the Advanced Visual C++ 7 sample in the Plus! Plugins download.

3.  -  Again, this can be easily achieved using the Messenger API, there is a function to open a new conversation with someone.


RE: Retrieving friendly name of contact who sends action by can16358p on 10-19-2005 at 02:16 PM

thanks, ill look at the advanced sample, but i didnt understand the solutoion about the first problem. i will declare a boolean, but whats next.. :D


RE: Retrieving friendly name of contact who sends action by J-Thread on 10-19-2005 at 06:44 PM

Ok, you make a boolean, lets call it HasSendCommand.

It should be set to false by default. As soon as your function sends the notification, set it to true.

In the receivenotification function, you have to check if HasSendCommand is true. If it is, it should be set to false again and the rest of the function should be ignored (because it was your own notification). If it is false, it was a notification of another person, so it should be parsed(Y)


RE: Retrieving friendly name of contact who sends action by can16358p on 10-20-2005 at 07:30 PM

thanks.

now i have another problem.
i cant send a notify action (the ones that are 5 characters) and a text message at the same time. it sends the text message, but not the action. what should I do?