You are not logged in.


Thursday, August 26th 2004, 4:07pm

Injecting mouse events with cron

Hi , I'm using mandrake10 with the supplied kde3.2 version.

I'd like to find a way to inject a mouse click on the current position or any other position on screen with a cron job. Is this possible in any way ?

I'm trying to rid myself of any windows boxes , but the above has to be somehow accomplished.

As long as xfree recieves a LMB click with a cron job I'd be happy !
If there is a way to manipulate the mouse position in one move I would really like to hear about it.

I have searched about any keyword on google (macro script mouseevent ...) but i only turned up Xmacro.

It states what I need to have done but I can't install it because it needs some header files I don't know about. The last change to the project was in 2001 so that might have something to do with it.

Thank you in advance !


Friday, August 27th 2004, 11:35am

As at the moment no one is in need of such application I'll continue my search in the wood called Java.

So for anyone in need of a readout and reposition and execution of mouse commands while not actually moving the mouse IMHO look into some java applications with ?classes? using robot ;
example :

try {
Robot robot = new Robot();

// Simulate a mouse click

// Simulate a key press
} catch (AWTException e) {

So now I'm going to learn to program Java huh. yeah , whatever , anyway thanks for not totally having removed this topic.




Posts: 257

Location: Lisbon, Portugal

Occupation: Software Engineer

  • Send private message


Saturday, August 28th 2004, 2:42am

I guess that is really a good approach. Other approches would force you to implement a little C program to use the xlib XSendEvent call. Although faster it's a more complex development.