Pages

How to make a program that can press keyboard for you ???


*******************************************************
COMPLETE SOURCE CODE FOR : PressKeyboard.java
*******************************************************


import java.awt.Robot;
import java.awt.event.KeyEvent;

public class PressKeyboard
{
public static void main(String[]args)
{
try
{

Robot a=new Robot();

while(true)
{
//THIS PROGRAM WILL PRESS A FOR YOU
a.keyPress(KeyEvent.VK_A);

//THIS PROGRAM WILL SLEEP FOR 5 second
a.delay(5000);
}
}
catch(Exception exception)
{
exception.printStackTrace();
}
}
}


*******************************************************
JUST COMPILE AND EXECUTE IT
*******************************************************
Related Posts Plugin for WordPress, Blogger...