|
-
Oct 14th, 2001, 10:00 AM
#1
Thread Starter
Junior Member
Trying to get MSN Messenger Text
How can I get the Text that a user sent to me in MSN Messenger... I got the handle of Messenger but I cant get the text they sent out of it. Please Help!
This is our world now, The world of the pop-trunk and the switch.
The beauty of my Broad :-)
We wage wars, murder, cheat, lie to our women and make them believe its for their own good. And we're the criminals.
My crime is but of pimpology.
I am a Pimp, and this is my manefesto!
-
Oct 14th, 2001, 10:05 AM
#2
Stuck in the 80s
If you already have the handle of the window then:
VB Code:
Public Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As _
Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function SendMessageByString Lib "user32" _
Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As _
Long, ByVal wParam As Long, ByVal lParam As String) As Long
Public Const WM_GETTEXT = &HD
Public Const WM_GETTEXTLENGTH = &HE
Public Function GetText(Window As Long) As String
'Gets any text from a window
Dim Cursor As String, Text As Long
Text& = SendMessage(Window&, WM_GETTEXTLENGTH, 0&, 0&)
Cursor$ = String(Text&, 0&)
Call SendMessageByString(Window&, WM_GETTEXT, Text& + 1, Cursor$)
GetText$ = Cursor$
End Function
-
Oct 14th, 2001, 10:16 AM
#3
Thread Starter
Junior Member
its not working right.......
this is the code im using.......
TheNum = HScroll1.Value
Instant% = lsthandle.List(TheNum)
Win% = GetWindow(Instant%, GW_CHILD)
Do
Text2$ = GetClass(Win%)
If Text2$ = "RichText20A" Then Exit Do
Win% = GetWindow(Win%, GW_HWNDNEXT)
Loop Until Win% = 0
Text& = SendMessage(Win%, WM_GETTEXTLENGTH, 0&, 0&)
Cursor$ = String(Text&, 0&)
Call SendMessageByString(Win%, WM_GETTEXT, Text& + 1, Cursor$)
Messages.Text = Cursor$
I have my program look for all the instant messages and put them in a listbox. THen i fix it so that whichever one i want the text from i move the scroll bar to the number in the listbox and click get message and this is the get message command_click
But it doesn't get any messages... it just sits there.... Messages.Text is a richtext box also....... can someone help me?
This is our world now, The world of the pop-trunk and the switch.
The beauty of my Broad :-)
We wage wars, murder, cheat, lie to our women and make them believe its for their own good. And we're the criminals.
My crime is but of pimpology.
I am a Pimp, and this is my manefesto!
-
Oct 27th, 2001, 08:11 PM
#4
Junior Member
Private Sub Msg_OnTextReceived(ByVal pIMSession As Messenger.IMsgrIMSession, _
ByVal pSourceUser As Messenger.IMsgrUser, ByVal bstrMsgHeader As String, ByVal bstrMsgText As String, _
pfEnableDefault As Boolean)
'Do Stuff Here
'bstrMsgText is the text received.
End Sub
Doctor UDP
VB VBSCRIPT VC HTML JAVA COBOL RPG I II III needing to learn DirectX & .Net programming in VB.
_____________________________
 The stupidest question is the one you didn't bother to ask.. ... . ... ... .
-
Oct 27th, 2001, 09:23 PM
#5
Frenzied Member
Originally posted by Doctor UDP
Private Sub Msg_OnTextReceived(ByVal pIMSession As Messenger.IMsgrIMSession, _
ByVal pSourceUser As Messenger.IMsgrUser, ByVal bstrMsgHeader As String, ByVal bstrMsgText As String, _
pfEnableDefault As Boolean)
'Do Stuff Here
'bstrMsgText is the text received.
End Sub
Dont you need the reference to MSN object Library?
You just proved that sig advertisements work.
-
Oct 28th, 2001, 02:37 PM
#6
Junior Member
Well duhhhhh, yeah. Sorry somehow i assumed you had that already. Just goto Project > References and add Messenger Type Library and that should do it.
Doctor UDP
VB VBSCRIPT VC HTML JAVA COBOL RPG I II III needing to learn DirectX & .Net programming in VB.
_____________________________
 The stupidest question is the one you didn't bother to ask.. ... . ... ... .
-
Sep 28th, 2002, 06:29 PM
#7
Hyperactive Member
is there anyway, to Set the text inside a windows instead of "get the text" ?
____________________________________________
Please rate my messages. Thank you!
____________________________________________
Bram Vandenbon
http://www.bramvandenbon.com
-
Sep 29th, 2002, 12:05 AM
#8
This might give you a few ideas.
Last edited by Nightwalker83; Dec 13th, 2007 at 07:45 PM.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Sep 29th, 2002, 12:42 PM
#9
Stuck in the 80s
"When Threads Arise From the Grave, Part 4"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|