Results 1 to 1 of 1
  1. #1
    infinity is offline Member
    Join Date
    Jan 2009
    Rep Power

    Default key press triggering something when program isn't in focus

    i'm writing a bot, and since the task i'm making it do is going to move the mouse frequently, it would be difficult for the user to try and stop it by putting the program in focus and pressing a button.

    so i think the next smartest thing is to stop it when a combination of keys are pressed. However, there's no guarantee that the program will be in focus.

    I tried keylisteners and key bindings and niether work without focus.

    i did google it, and it's been said that java is incapable because it's oriented around security. Is that true? if so, what do you recommend?

    right now, i'm thinking windows listener(minimize to start, maximize to stop). Let me know if there's something better.
    Last edited by infinity; 04-22-2009 at 06:58 AM.

Similar Threads

  1. Press F1 key to open Help Contents
    By Doctor Cactus in forum New To Java
    Replies: 1
    Last Post: 12-20-2008, 02:22 PM
  2. Remote Triggering of Webcam
    By Jakester in forum Java Applets
    Replies: 3
    Last Post: 10-15-2008, 08:06 PM
  3. press any key to continue
    By dotnet007 in forum New To Java
    Replies: 3
    Last Post: 05-11-2008, 06:19 AM
  4. Press any key to continue/press enter
    By JT4NK3D in forum New To Java
    Replies: 1
    Last Post: 11-17-2007, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts