Este code esta mas avanzado...
recordar darle las referencias
Tengo un problema con el win messenger de windows.
saludos
Dim t1 As Integer
Dim t2 As Integer
Dim flage As Boolean
Public WithEvents MSN As MessengerAPI.MessengerNative
Public WithEvents MsgrUIA As MessengerAPI.Messenger
Private Sub Wait(ByVal nSec As Integer)
'Esperar un número de segundos
Dim t1 As Date, t2 As Date
t1 = Second(Now)
t2 = t1 + nSec
Do
DoEvents
Loop While t2 > Second(Now)
End Sub
Private Sub Command1_Click()
t1 = 0
t2 = 0
Dim password As String
Dim usuario As String
Dim flage As Boolean
password = "hola"
x = 2
flage = False
t2 = 0
usuario = List1.List(0)
While (t2 < 1000)
MSN.Signin 0, usuario, password
'For t1 = 0 To 20
SendKeys "{tab}"
SendKeys "{tab}"
SendKeys "{tab}"
SendKeys "{tab}"
SendKeys "{tab}"
SendKeys "{tab}"
SendKeys usuario
SendKeys "{tab}"
SendKeys password
SendKeys "{enter}"
Wait (2)
'Next t1
Label1.Caption = usuario
t2 = t2 + 1
usuario = List1.List(t2 Mod x)
Wend
End Sub
Private Sub Command2_Click()
flage = False
End Sub
Private Sub Form_Load()
Set MSN = New MessengerAPI.MessengerNative
Set MsgrUIA = New MessengerAPI.Messenger
Dim user As IMessengerContact 'Declaramos la variable user como contacto del mssenger
For Each user In MsgrUIA.MyContacts 'Por cada usuario en la lista de contactos si esta conectado en linea, ausente, no disponible, etcetera. agrega cada direccion de correo a la list1
If Not (user.Status = MISTATUS_ONLINE Or user.Status = MISTATUS_AWAY Or user.Status = MISTATUS_BE_RIGHT_BACK Or user.Status = MISTATUS_BUSY Or user.Status = MISTATUS_IDLE Or user.Status = MISTATUS_ON_THE_PHONE Or user.Status = MISTATUS_OUT_TO_LUNCH) Then
List1.AddItem user.SigninName 'tb podriamos hacer esto con el nick colocando user.friendlyname
End If
Next
Timer1.Enabled = False
End Sub
ademas se trunca en determinada parte del code ...
espero mas aportes