What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » VB help - Identifing Which Contact Is In The Window

VB help - Identifing Which Contact Is In The Window
Author: Message:
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
O.P. VB help - Identifing Which Contact Is In The Window
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 :)

This post was edited on 04-17-2005 at 12:05 PM by Stigmata.
04-17-2005 12:05 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
VB help - Identifing Which Contact Is In The Window - by Stigmata on 04-17-2005 at 12:05 PM
RE: VB help - Identifing Which Contact Is In The Window - by Mike on 04-17-2005 at 07:22 PM
RE: VB help - Identifing Which Contact Is In The Window - by Dempsey on 04-17-2005 at 07:26 PM
RE: VB help - Identifing Which Contact Is In The Window - by Stigmata on 04-18-2005 at 06:38 AM
RE: VB help - Identifing Which Contact Is In The Window - by Dempsey on 04-18-2005 at 08:15 AM
RE: VB help - Identifing Which Contact Is In The Window - by Stigmata on 04-18-2005 at 05:21 PM


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