Ruby Desktop Bot

How can I make a ruby desktop application that can simulate keyboard and
mouse input?

and can anyone point me in the right direction? I’ve been searching all
night and all I’ve found is IRC bots…

What end-goal are you trying to achieve?
I find that it’s rarely a good idea to simulate human input devices.
You’re usually better off going through an appropriate API to accomplish
a task, rather than trying to do it through the user interface.

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.

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:
OpenKore Wiki 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:

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.