well the idea is, set the open window's contact email + friendly name to clipboard
at the moment ive only made it to work with im windows with view by email
here is what i currently have:
code:
Public Sub getcontactinfo(id As String)
Dim imHwnd As Long
Dim lLength As Long
Dim strCaption As String
Dim MsgrContact As IMessengerContact
Dim Memail As String
imHwnd = FindWindow("IMWindowClass", vbNullString)
lLength = GetWindowTextLength(imHwnd)
strCaption = String$(lLength, vbNullChar)
GetWindowText imHwnd, strCaption, lLength + 1
If strCaption Like "*" + "@" + "*" Then
'using view contact by email
Memail = Split(strCaption, " - Conver")(0)
Set MsgrContact = MessengerAPI.Messenger.GetContact(Memail, MessengerAPI.Messenger.MyServiceId)
If id = "fn" Then
'set friendly name
VB.Clipboard.SetText MsgrContact.FriendlyName
ElseIf id = "em" Then
'set email
VB.Clipboard.SetText MsgrContact.SigninName
End If
Else
'window isnt email so
'set friendlyname
Mfn = Split(strCaption, " - Conver")(0)
If id = "fn" Then
'set friendly name
VB.Clipboard.SetText Mfn
ElseIf id = "em" Then
' Need to do
End If
End If
End Sub
this isnt working
just beeps, and nothing is added...
if anyone has any ideas, please help