From: Yohanes Santoso Date: 2002-03-12T23:57:56+09:00 Subject: Re: Controlling Mouse/Keyboard "Norman Makoto Su" writes: > 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 Is this a Ruby issue? I think not. I don't know about Win32, but in X, it is a simple matter of sending the X server the appropiate packet you want. I remember playing prank on some classmates couple years ago: moving their mouse, and typing gibberish on their terminal when they execute some trojan program I put in their home dir. Can Ruby do it? I think so... Last time I used the Xt lib. I don't think there is any Xt binding to Ruby, but theoritically, you can always construct the packet by hand. But, this is definitely not a cross-platform solution. YS.