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

Pages: (2): « First [ 1 ] 2 » Last »
Need help
Author: Message:
Dark Link
Junior Member
**


Posts: 24
Joined: Dec 2004
O.P. Need help
How can I do in vb6 to send a message to every contact on my list when i start msn???
02-16-2005 05:38 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Need help
I'll attach the Messenger API docs for you ;) Since you're using VB6, it won't be all that difficult to do.
Hell, it's not hard in C++ either tbh!

Note: make sure you have Messenger API Type Library checked in References.

.zip File Attachment: MessengerAPI.zip (355.64 KB)
This file has been downloaded 162 time(s).

This post was edited on 02-16-2005 at 07:02 PM by RaceProUK.
[Image: spartaafk.png]
02-16-2005 07:01 PM
Profile PM Web Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: Need help
code:
Private objMessenger As MessengerAPI.Messenger

Private Sub Timer1_Timer()
Dim sent As Boolean
   
    Dim objMessengerContact As IMessengerContact
    Dim objMessengerContacts As IMessengerContacts

    Set objMessenger = New MessengerAPI.Messenger
    Set objMessengerContacts = m_objMessenger.MyContacts
If sent = False Then
    For Each objMessengerContact In objMessengerContacts
        If objMessengerContact.Status = MISTATUS_ONLINE Then
          objMessenger.InstantMessage objMessengerContact
          SendKeys "Insert Message Here"
          Call PostMessage("IMWindowClass", WM_CLOSE, 0, 0)
          sent = True
          End If
    Next
Else
MsgBox "Message Has Already Been Sent!"
End If
End Sub



that should do :)

This post was edited on 02-16-2005 at 07:10 PM by Stigmata.
02-16-2005 07:04 PM
Profile PM Web Find Quote Report
Dark Link
Junior Member
**


Posts: 24
Joined: Dec 2004
O.P. RE: Need help
Ok but I was trying to do it in a MSGPLUS Plugin. But thanks.
02-16-2005 07:07 PM
Profile E-Mail PM Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: Need help
bah, im a nice person....

code:
'//////////////////////////////////////////////////////////////////////
'//                                                                  //
'// Purpose: Initialization function                                 //
'//                                                                  //
'//////////////////////////////////////////////////////////////////////
Public Function Initialize(ByVal nVersion As Long, ByVal sUserEmail As String, ByVal oMessenger As Object) As Boolean
    Initialize = True
Dim objMessengerContact As IMessengerContact
    Dim objMessengerContacts As IMessengerContacts
    Set objMessengerContacts = oMessenger.MyContacts
    For Each objMessengerContact In objMessengerContacts
        If objMessengerContact.Status = MISTATUS_ONLINE Then
          oMessenger.InstantMessage objMessengerContact
          SendKeys "Insert Message Here"
          Call PostMessage("IMWindowClass", WM_CLOSE, 0, 0)
          End If
    Next
End Function


goes inside the sample class module....

This post was edited on 02-16-2005 at 07:16 PM by Stigmata.
02-16-2005 07:11 PM
Profile PM Web Find Quote Report
Dark Link
Junior Member
**


Posts: 24
Joined: Dec 2004
O.P. RE: Need help
Thanks!

But I need one more thing.
I need the code to do the following:
When a user comes online, send a message to him.

Thanks in advance.
02-16-2005 07:17 PM
Profile E-Mail PM Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: Need help
ok in the same class module...

code:
Public Sub oMessenger_OnContactStatusChange ( some thing something....)
if pMContact.status = MISTATUS_ONLINE then
          oMessenger.InstantMessage pMContact.signinname
          SendKeys "Insert Message Here"
          Call PostMessage("IMWindowClass", WM_CLOSE, 0, 0)
end if
end sub

something like that :)
02-16-2005 08:18 PM
Profile PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: Need help
that wont send it it needs sendkeys {enter} too
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
02-16-2005 11:17 PM
Profile E-Mail PM Web Find Quote Report
Dark Link
Junior Member
**


Posts: 24
Joined: Dec 2004
O.P. RE: Need help
quote:
code:
Private objMessenger As MessengerAPI.Messenger
Private Sub Timer1_Timer()
Dim sent As Boolean
   
    Dim objMessengerContact As IMessengerContact
    Dim objMessengerContacts As IMessengerContacts

    Set objMessenger = New MessengerAPI.Messenger
    Set objMessengerContacts = m_objMessenger.MyContacts
If sent = False Then
    For Each objMessengerContact In objMessengerContacts
        If objMessengerContact.Status = MISTATUS_ONLINE Then
          objMessenger.InstantMessage objMessengerContact
          SendKeys "Insert Message Here"
          Call PostMessage("IMWindowClass", WM_CLOSE, 0, 0)
          sent = True
          End If
    Next
Else
MsgBox "Message Has Already Been Sent!"
End If
End Sub


When I try to put it it says 'User-defined type not defined!'
What do I do??

It says it in
code:
        Dim objMessengerContact As IMessengerContact
        Dim objMessengerContacts As IMessengerContacts

This post was edited on 02-17-2005 at 08:15 PM by WDZ.
02-17-2005 07:39 PM
Profile E-Mail PM Find Quote Report
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
35 / Male / –
Joined: Jun 2004
RE: Need help
stick this above the initialise function.
code:
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

private const WM_USER = &10

02-17-2005 07:47 PM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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