From: Ed Sinjiashvili Date: 2002-03-13T18:18:22+09:00 Subject: Re: Controlling Mouse/Keyboard "Norman Makoto Su" writes: > Hi, > > I asked this question about a year ago, so I was wondering if the situation has > changed at all. With Ruby, I was wondering if it is possible to (preferably in > a cross platform way) to: > > 1.) control the mouse (i.e. move the mouse, execute mouse clicks, etc.) > 2.) make keyboard events occur (i.e. press keys on the keyboard) > 3.) take screenshots of the desktop > > I'm trying to create a remote PC access application (like pcAnywhere). I > remember there being bindings to VNC, but it really didn't provide what I > needed. I'm guessing I can use the ruby's Win32API but I'd rather use something > else that takes more advantage of ruby's programming style and is not Microsoft > dependent. > > Any suggestions/pointers would be greatly appreciated. I'm not sure if this is what you meant, but have a look at SDL cross-platform library. It was designed for making games and may provide features you need. There are two ruby bindings to SDL, AFAIK: RUDL and rusdl. I don't have links to them off the top of my head, but search them at google or RAA. I'm using RUDL myself and must say it's pretty cool. Hope that helps, --Ed