Miranda IM

Results 1 to 7 of 7

Thread: How to send a single MSN message?

  1. #1

    How to send a single MSN message?

    Hi,

    Is it possible to send a single MSN message to a user [email protected]?
    I'm writing a plugin to miranda, but I need to send o a certain user a message. It's like a timer message: after 1 min I need to send a message to this user, i.e. I want to start conversation with the user.

    If it's possible how do I code this? I'm not familiar with the Miranda's API, so if possible let me know some code samples so that I write my own.

    Thanks in advance.

  2. #2
    Join Date
    June 2005
    Posts
    11,839
    You need to find a user in your contact list and send him a message. Use protocol API to send messages. Look into the message window plugin sources and do the same.

  3. #3
    Which project is that in the solution?

  4. #4
    Join Date
    June 2005
    Posts
    11,839
    Quote Originally Posted by emersonespinola View Post
    Which project is that in the solution?
    SRMM is the simlest.

  5. #5
    Join Date
    March 2005
    Posts
    2,775
    Quote Originally Posted by emersonespinola View Post
    Which project is that in the solution?
    Look in msgdialog.c (SRMM project) where it handles the WM_COMMAND -> IDOK message (user is pressing enter to send the message) and then follow the code from there. It's fairly simple.
    • TabSRMM Wiki - documentation for TabSRMM
    • Blog
    • contact (GMail / GTalk): silvercircle(at)gmail(dot)com

  6. #6
    Thank you I'll try it out.

    But something that I noticed is that it uses hContact which is HANDLE type. Considering that HANDLE is typedef of (void *), can I simply cast from char * to void *? For example:

    char contact[15] = "[email protected]\0";
    HANDLE hContact = (HANDLE)contact;

    Can I simply do that? Or is the content of hContact different from a string, something like an integer that represents the contact? If the content is different is there any method/function to retrieve hContact from a contact string?

    Thank you all for the support.

  7. #7
    Join Date
    June 2005
    Posts
    11,839
    No, you need to search through all contacts, find the one with e-mail matching yours and get it hContact.

Similar Threads

  1. [resolved] how to send message on Enter
    By lemming78 in forum Technical Support
    Replies: 3
    Last Post: 29 Jun 2008, 6:50 PM
  2. How to send message to multiple contacts?
    By ClaudioNunes in forum Technical Support
    Replies: 2
    Last Post: 15 Sep 2006, 3:02 AM
  3. How to send a message
    By yeti in forum Coding for Miranda IM
    Replies: 0
    Last Post: 27 Aug 2006, 3:53 PM
  4. How to send message by double clicking?
    By RealHJ in forum Technical Support
    Replies: 9
    Last Post: 13 Jul 2005, 11:40 PM
  5. How to auto send away message to MSN contacts?
    By ZellSF in forum Technical Support
    Replies: 1
    Last Post: 28 May 2005, 2:53 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •