Im writing a ignor program for AIM in C and VB. I need help on how to log the AIM chat window and to use a scanf() i presum to look for content or repeat spam and then pass that SN onto the VB script. here is some code and exsample pics.
http://www.gnt.net/~alonzo/ice_blue/tree.gif
http://www.gnt.net/~alonzo/ice_blue/ignor.jpg
Ok now that U undersand how it works from the menu tree. I will say it again. how to log the chat window to a text file for spam and offencive material then take that sn and send it to the vb script where it says SN here should be the usr SN to ignor here is the code.
Code:
Dim i
If text1.Text = "" Or text1.Text = " " Or text1.Text = " " Or text1.Text = " " Then
MsgBox "Enter a screen name to ignore!!", 16, "Dick"
Else
Do
If list1.List(i) = text1.Text Then Exit Sub
i = 1 + i
Loop Until list1.List(i) = ""
list1.AddItem text1.Text
text1.Text = ""
End If
In the Timer put this code...
Dim e%, j%, AOL%, k%, a, x
For a = 0 To list1.ListCount
AOL% = FindWindow("AOL Frame25", 0&)
e% = FindChildByTitle(AOL%, ">Instant Message From:")
If e% <> 0 Then
heh = GetWinText(e%)
bah = Mid(heh, InStr(heh, ":") + 2)
If LCase$(bah) = LCase$(list1.List(a)) Then
k% = SendMessageByNum(e%, WM_CLOSE, 0, 0&)
End If
End If
Next a
x = SendMessageByString(e%, WM_SETTEXT, 0, " " & heh)
In (general) put this code...
Function GetWinText (hWnd As Integer) As String
lentos = SendMessage(hWnd, WM_GETTEXTLENGTH, 0&, 0&)
Buffer$ = Space$(lentos)
x = SendMessageByString(hWnd, WM_GETTEXT, lentos + 1, Buffer$)
GetWinText = Buffer$
End Function
This is using the Master2.bas AIM modular but i need it to retrive the SN from the C program or the C program to send the VB script the SN. I can log stuff but dont know how to grab only the AIM window and dont know how to scan it with filter ASCII defined by me and the user in a text database. and how to look for repeat in a timout() intervale