Hi im new to this board. Im beginning a new Python prject, my last one was a html GUI which I built in Tkinter. This time im going to make a AIM bot. Any idea on where to start with a project such as this. All help is appreciated! Thanks

Dani AI

Generated

A few practical notes that pick up where this thread left off.

First: if the goal was to target AOL Instant Messenger specifically, that service is no longer available (AIM was shut down in 2017), so building an AIM bot today is not practical — look into a modern target instead (AOL Instant Messenger). Given what wants (a bot that replies to "hi"), there are two useful paths: (1) build a small local client/server chat to learn how messages move end-to-end, or (2) write a bot for a supported platform (Telegram, Discord, Slack) where Python libraries handle connection/auth and you only implement handlers. Libraries like python-telegram-bot or discord.py are well documented and remove the low-level plumbing (python-telegram-bot docs, discord.py docs).

How data typically flows and how to integrate with Tkinter: run networking in a background worker (thread or asyncio), and keep the Tkinter mainloop on the main thread. Use thread-safe queues to pass incoming messages into the GUI and outgoing messages from the GUI to the network worker. Example pattern:

import threading, queue, time

def network_thread(in_q, out_q):
    while True:
        msg = receive_from_network()      # placeholder for library/socket read
        in_q.put(msg)
        try:
            to_send = out_q.get_nowait()  # messages queued by GUI
            send_to_network(to_send)
        except queue.Empty:
            pass
        time.sleep(0.05)

Tkinter polls in_q with root.after() and pushes user-typed text into out_q when Send is clicked. This keeps the UI responsive and avoids unsafe GUI updates from background threads. As and hinted, you will need to handle authentication and terms of service for any real platform — modern APIs use tokens and have rate limits, so add logging, error handling, and a local test mode before deploying.

Recommended Answers

All 6 Replies

Care to elaborate a little more on what your AIM bot should accomplish?

I just want it to be able to talk to other users. If someone says "hi", I want to say high back.

Hi rysin,

Unless there's a high-level python module that takes care of chat-type stuff for you (and if there is, I don't know about it), you're going to have to learn how to use client and server sockets to send data from one computer to another. An example is given - scroll down until you see "chat server" with an attached example program file.

There are several good socket programming tutorials available for C/C++ (I learned to use sockets with those languages) but I haven't read any of the ones for python. However, I googled around and found two which might be helpful to you. looks pretty thorough, and may be a little simpler and easier to follow.

Hope this helps!

Thanks for the help! Im going to begin reading those documents now. If I have a question I shall post it.

I need a little help understanding how im going to do this. How am I gonna get the information that a user sends to the bot to the server program and how am I gonna get the info I wanna send to the user to them?

AIM doesn't just allow random clients to connect to their servers. You need a authorization number that is sent to the server in order to validate the client. Once you are authorizid you can send messages. You need to download their sdk at aim.com which contains that number. The problem is that it is meant for languages like java and c# and others. If the SDK uses dll's you could use ctypes
to call them. That would be the only way to use the authorization code and the chat protocol other than learning a whole nother language.
I hope this is making sense to whoever reads this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.