-
Unix API ?
I have no clue where to start.
Im familiar w. C/C++
How would I go about this.
Using C or C++ to interact w. other windows/ programs.
ie:
If i wanted to create an irc bot.
Have a bot sit online in a chat room running *****X or xchat or any irc client. View each line sent to chat by others, and then responded accordingly.
How would I go about doing that?
I believe in Windows I would use the Win32 api calls such as FindWindowEx etc etc.
What about in Unix ?
Thank you
-
If you are interested in writing an IRC bot, I suggest downloading the Eggdrop IRC bot and reviewing the source code (try searching for it at freshmeat.net).
Cheers,
-
My question was in general.
Using my program to deal w. other programs i/o.
-
You're going to have to read up on fork and exec (doing a man on either one will tell you something of what you need to know), and then you'll need to study interprocess communication.
Yes, it is do-able, but it can also be a bit tricky. Advanced Programming in the Unix Environment (Stevens) is probably one of the most detailed and in-depth guides you can find on these topics. Beginning Linux Programming (Wrox Press) also talks about it a little, if you're looking for a book. Ageneral lesson is a little too complicated to get in to here though.
starX
www.axisoftime.com
-
This has some good stuff on unix programming
http://www.cs.cf.ac.uk/Dave/C/CE.html