Ahh, I am going to sidestep the whole ethical part of the question and
suggest you look at specific the bots for specific games and see how they
do it.

The two most popular ones that come to mind is:
http://www.openkore.com/index.php/Main_Page and MMO Glider.

Most bots, I would say, fall into two categories. The first bypasses the
interface directly and directly communicates with the server via packets.
Kore does this and is one of the most advance direct packet injection bots
I can think of. On the other hand is what you had in mind with manipulating
the actual game client with a program. This is what MMO glider does. It
also does a bunch of packet sniffing to figure out what the actual game
state is.

Hopefully that gives a bit of background to everybody else at least. I
can't think of a specific library, but I know capybara does similiated key
presses as part of its testing environment. For mouse stuff, I found this:
https://github.com/erinata/auto_click

You might also want to look at AutoIt which a great many simple bots are
written.

PS: you might want to search for 'automation' as that is really what you
are trying to do.


On Sun, Jun 23, 2013 at 9:10 AM, Jose T. <lists / ruby-forum.com> wrote:

> I want to make a bot to play a game for me, I rarely play the game but
> it requires a huge amount of repetition, so I'd like to make a bot in
> Ruby to do it.
>
> I keep researching it and it seems most people are concerned with web
> programming of IRC.
>
> I just want the ruby script to keep pressing keys for me and moving the
> mouse so that the game can be played on another computer while I do my
> studies.
>
> --
> Posted via http://www.ruby-forum.com/.
>
>


-- 
Incoherently,
Ricky Ng