Writing programs that interface with AIM

Tricks, Hacks, Tools, other Add-ons, etc.

Moderators: Big-O Ryan, Big-O Mark

pete11083
Just Registered
Just Registered
Posts: 3
Joined: Sat Nov 08, 2003 1:55 am
Contact:

Writing programs that interface with AIM

Post by pete11083 »

Does anyone know how programs like aim+ are written? I am looking for ways to interface a program I am writing with the aim client, for instance being able to log the text from the individual IM windows. Not quite as advanced as what aim+ does, modifying the actual aim clients behavior itself. Any insight or pointing me in the right direction of where to find information about this would be greatly appreciated. I have been searching the internet for a few days now and there isn't any obvious information out there but maybe I'm jsut looking for the wrong thing.

thanks in advance,
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

there are 2 ways. the first is to read the content from the windows. the second is to monitor the packets between AIM and the server. the easiest way is to get it from the windows. you do it using windows APIs. GetWindowText should be what you need to read the message content. the problem with it is it only returns a certain amount of text (something like 64K) maximum. after that point you need to clear the window.

logically, its more efficient to log the network traffic. you might want to write a SOCKS4 proxy first. then you can manipulate the traffic at will. this can be very frustrating at times. i know it from experience.
User avatar
Anthony
Moderator
Moderator
Posts: 1532
Joined: Thu Sep 12, 2002 5:10 am
Location: Rochester, New York
Contact:

Post by Anthony »

Although I don't know how but there is a way to do logging in real time with out clearing the window (see middle_man).
Image
PhaseDMA - Check it out
My AIM+ FAQ
pete11083
Just Registered
Just Registered
Posts: 3
Joined: Sat Nov 08, 2003 1:55 am
Contact:

Post by pete11083 »

Yes originally I was going to do it by monitoring the network traffic, but I realiezed while it might be easy to get the incoming packets the out going packets are a diffrent story. like you said, I would have to write a "proxy". Not somthing I want to do right now. Ideally I would like to write a C++ class that can capture the event of new text being written into a window and then retrieve that text to its own buffer until my program gets around to processing it. then my main program would look for when a new message window was created and make a logging object to take care of that window. The main thing I have no Idea how it works is interfacing any program I would write with the AIM message windows specifically how do I get my program to access the messsage windows & how would I know when these text updates happen so that I could go read from the message windows.
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

PhaseDMA wrote:Although I don't know how but there is a way to do logging in real time with out clearing the window (see middle_man).
middle_man is a proxy
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

pete11083 wrote:Yes originally I was going to do it by monitoring the network traffic, but I realiezed while it might be easy to get the incoming packets the out going packets are a diffrent story. like you said, I would have to write a "proxy". Not somthing I want to do right now. Ideally I would like to write a C++ class that can capture the event of new text being written into a window and then retrieve that text to its own buffer until my program gets around to processing it. then my main program would look for when a new message window was created and make a logging object to take care of that window. The main thing I have no Idea how it works is interfacing any program I would write with the AIM message windows specifically how do I get my program to access the messsage windows & how would I know when these text updates happen so that I could go read from the message windows.
I've never written an AIM add-on that takes the text from the window, but my approach would be to hook all the IM windows' chat boxes. The WM_PAINT message will be triggered immediately before text is added to the box. Off the top of my head I can't think of a message that would trigger after writing text in the box. That might be a good starting point though.
pete11083
Just Registered
Just Registered
Posts: 3
Joined: Sat Nov 08, 2003 1:55 am
Contact:

Post by pete11083 »

Thanks for all your help! I think I found the right path now, Spy++ that comes with visual studio lists all the windows & processes running and you can monitor events that happen in each.
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

WARNING: the window class names in AIM 5 do not match in all versions. AIM 4 has different classnames too. You may want to accomodate for that. I presume when AIM 6 comes out they'll change the classnames again.
User avatar
SNiiP3R
Addict
Addict
Posts: 62
Joined: Wed Sep 18, 2002 9:38 am
Contact:

Post by SNiiP3R »

AIM is getting old :o bleh
Socket Scientist
User avatar
insomica
Addict
Addict
Posts: 116
Joined: Sat Feb 01, 2003 6:00 am
Contact:

Post by insomica »

yeah aim is getting old. Does anyone know of another IM program? :twisted: :idea:
Bitwise: insomica ->Image
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

bitwise chat
msn
yahoo messenger
icq
fuuucckkers
Moderator
Moderator
Posts: 815
Joined: Sun Sep 22, 2002 3:33 pm
Contact:

Post by fuuucckkers »

Master Jedi wrote:bitwise chat
msn
yahoo messenger
icq
But ICQ is AOL :roll:
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

he said other than AIM. icq uses the oscar protocol like AIM, but implements a number of things AIM doesn't. just because they're both made by AOL doesn't mean they're the same.
User avatar
insomica
Addict
Addict
Posts: 116
Joined: Sat Feb 01, 2003 6:00 am
Contact:

Post by insomica »

What ones are better then AIM. I heared ICQ was worse then AIM.
Last edited by insomica on Sun Nov 16, 2003 4:38 pm, edited 1 time in total.
Bitwise: insomica ->Image
fuuucckkers
Moderator
Moderator
Posts: 815
Joined: Sun Sep 22, 2002 3:33 pm
Contact:

Post by fuuucckkers »

insomica wrote:What ones are better then AIM. I heared ICQ was worse then ICQ.
Can you say double negative ? I think that's a typo.

As for the question.
I use GAIM. It's much better than AIM :D
And they have a windows port. Although it's not updated as much as the *nix client.
http://gaim.sf.net
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest