http://carl.kenner.googlepages.com/glovepie
Glove PIE is a programmable emulator for controllers and such. I use it so I can use my Wiimote on the computer. The main interface is basically C-Script (I think), and can be used with a wide variety of things, like the Wiimote for example. I am REALLY bad at explaining things, so maybe it would be better for you to look into it yourselves...
EDIT: A few minutes ago I was trying to make a script that uses the Wiimote and the Nunchuck, to play Freelancer. With Glove PIE you can basically control every aspect of the Wiimote and its addons, even a sensor bar if you can create one, so it is really cool.
While being quite funny, your sig was the biggest one i've ever seen so far. No more than 700x250 please. ~utrack http://pastebin.com/SYQXBufs