4

I want to develop a app which monitors the mouse events like click,movements and keyboard inputs. The app should run in background. By using some special keys combination, the app will start record the events and after that we have to play the same.

I am new to automation stuffs. Is it possible to make the app to run as a service ?

Can we do this in Java ?

Thanks in advance.

Dinesh
  • 14,859
  • 20
  • 72
  • 113
  • Possible duplicate, http://stackoverflow.com/questions/68113/how-to-create-a-windows-service-from-java-app – Dennis Sep 29 '12 at 05:46
  • Thanks Dennis.The question that you have pointed out is meant for service creation. Dennis, can you tell me about the automation part? – Dinesh Sep 29 '12 at 05:52
  • Apologies for confusion, "MadProgrammer" is correct look into JNI. Here is relevent link, http://stackoverflow.com/questions/901224/listening-for-input-without-focus-in-java – Dennis Sep 29 '12 at 06:29
  • This is beyond the abilities of Java. You need to look and JNI and/or JNA, try having a look at http://stackoverflow.com/questions/12615714/os-level-event-handling and http://stackoverflow.com/questions/604541/tracking-os-level-window-events-in-java for some examples – MadProgrammer Sep 29 '12 at 06:29
  • @Dennis ps - I would have used an [AWTEventListener](http://docs.oracle.com/javase/7/docs/api/java/awt/event/AWTEventListener.html) instead, it gives you access to all the events that go through the event queue ;) – MadProgrammer Sep 29 '12 at 06:30

1 Answers1

0

Its absolutely possible to have an application which monitors the events. I have used an application called keylogger which can record the different keyboard and other events and ultimately saves the logs as File. what you can do is read the logs and filter out the info which you need. Also note that these keyloggers may be detected as virus by your antivirus which you need to take care of. But it wont hamper your files unlike other viruses as i have used it with success.

Regards, Anand

Anand Builders
  • 111
  • 1
  • 11