help getting chat room and pm text >:(

You can talk about VB programming here

help getting chat room and pm text >:(

Postby Guest » Sun Dec 11, 2005 12:15 pm


f****ng gay anyone here able to help me out getting the chat room and pm text so when people reply in chat it grabs there reply and samething for pm would be nice i tryed.......

Code: Select all
Dim TheText As String, TL As Long
Dim mywindowclass As Long
Dim wtlsplitterwindow As Long
Dim atl As Long
Dim atlaxwin As Long
Dim x As Long
Dim richedita As Long

mywindowclass = FindWindow("my window class", vbNullString)
wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
atl = FindWindowEx(wtlsplitterwindow, 0&, "atl:00504680", vbNullString)
atlaxwin = FindWindowEx(atl, 0&, "atlaxwin71", vbNullString)
x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
TL = SendMessageLong(richedita&, WM_GETTEXTLENGTH, 0&, 0&)
TheText = String(TL + 1, " ")
Call SendMessageByString(richedita&, WM_GETTEXT, TL + 1, TheText)
TheText = Left(TheText, TL)

If richedita = 0 Then
    Msgbox "Error: Cannot find window"
    Exit Sub
End If


any of you butter balls able to help my jewish ass out? Thanks.
Guest
 

Postby locohacker » Sun Dec 11, 2005 2:27 pm

You want the hold text or the last line, for the last line this should work for both

Code: Select all
Function GetChatText()
On Error Resume Next
Dim mywindowclass As Long
Dim wtlsplitterwindow As Long
Dim atl As Long
Dim atlaxwin As Long
Dim X As Long
Dim richedita As Long
Dim Button As Long
mywindowclass = FindWindow("my window class", Form1.Text1.Text)
wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
atl = FindWindowEx(wtlsplitterwindow, 0&, "atl:00536778", vbNullString)
atlaxwin = FindWindowEx(atl, 0&, "atlaxwin71", vbNullString)
X = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
richedita = FindWindowEx(X, 0&, "richedit20a", vbNullString)
richedita = FindWindowEx(X, richedita, "richedit20a", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
richedita = FindWindowEx(X, richedita, "RichEdit20A", vbNullString)
GetChatText = GetRoomText(richedita)
End Function


All you need to do is connect to the the im window or room window I think
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby locohacker » Sun Dec 11, 2005 2:53 pm

Check this code its grabs both pm and chat rooms last lines

one thing i need help with how to trim the richtextbox in a good way so there is not empty spaces :) all the ones i try dont work well :(
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby method » Wed Apr 12, 2006 9:10 am

loco could u tell me how i can compile this code of u. i made a form and with a text box and button on it and pasted your code and called the function from within button on click event but i get this errror :

Code: Select all
[b]compile error

sub or function no defined[/b]


and it points to FindWindow


could u tell me how to fix this error and make it work .Thanks
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Postby locohacker » Wed Apr 12, 2006 9:31 am

ah thas because you need to add a module

check this code is mad nice :)
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests