becuase there is no event to when someone writes in the conversation window. the way to do it would be to put it on a timer
you will need to understand findwindow and window classes functions.
something like this might work
code:
Public Sub SendMessage(thetext As String)
Dim imclass As Long, leet As Long
imclass = FindWindow("imwindowclass", vbNullString)
leet = FindWindowEx(imclass, 0&, "richedit20a", vbNullString)
leet = FindWindowEx(imclass, richedita, "richedit20a", vbNullString)
Call SendMessageByString(leet, WM_SETTEXT, 0&, thetext)
Call clicksend
End Sub
Public Sub clicksend()
Dim imclass As Long, Button As Long
imclass = FindWindow("IMWindowclass", vbNullString)
Button = FindWindowEx(imclass, 0&, "button", vbNullString)
Call SendMessageLong(Button, WM_KEYDOWN, VK_SPACE, 0&)
Call SendMessageLong(Button, WM_KEYUP, VK_SPACE, 0&)
End Sub
courtesy of stigmata's coding tips on his upcoming site..
www.plasticangels.com