|
-
Apr 4th, 2001, 04:07 AM
#1
Thread Starter
Junior Member
I've been playing around with various API calls, and I must say it's really fun.
I've got this idea for a program to autorepond to IMs on AIM that could be personalized by person. There may already be a program that does this, I don't care, I'm a programmer, I want to make one myself.
However I am unsure of how to view the text within the AIM boxes. I was looking on vbapi.com for maybe an API that could help. WM_GETTEXT looks promising, but I'm not sure how to use it (too late in the evening to get anything working ) anyway.
Am I going down the right path? can anyone lead me in the right direction with some code or examples. I'd be forever greatful.
-
Apr 4th, 2001, 06:37 AM
#2
There are some bas files for AIM on PatorJk's webpage which should help you.
-
Apr 4th, 2001, 01:06 PM
#3
PowerPoster
Here's how to set some text in instant messanger:
Code:
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Const WM_SETTEXT = &HC
Private Sub TitleCaption(strCaption As String)
Dim lng As Long, rc As Long, Message As String
Message = "Testing API Call"
lng = FindWindowEx(0, 0, vbNullString, strCaption)
Do
rc = FindWindowEx(lng, rc, "WndAte32Class", vbNullString)
SendMessage rc, WM_SETTEXT, 0&, ByVal Message
Loop While rc <> 0
End Sub
-
Apr 4th, 2001, 07:55 PM
#4
Thread Starter
Junior Member
ok, I tested out the example from the website you gave me, and that looks really promising. However I did not get very good chance to explore. That'll proubly have to wait till the weekend. From my first impressions it seems that the FindWindow function only finds the active IM box, is this different for the FindWindowEx?
For example, can I have the program send text to any screen name reguardless of if it is active or not?
I am thinking that to do that I'd have to get the title of all the individual IM windows, and then send text to each of them based on their titles. Does this sound right?
I'm not on a computer with VB right now so I can't really try out my ideas. But thanks for the help so far. Also if anyone has any other AIM links can you send them my way.
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
|