贤弟单腾,因崔思婷,机器人类打字~~~~~~
贤弟单腾,因崔思婷,机器人类打字~~~~~~
There is no nutrition in the blog content. After reading it, you will not only suffer from malnutrition, but also impotence.
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.util.stream.IntStream;/*** * @author 托马斯小火车喷雾又喷烟**/
public class CrazyTypist {private static final int[] KEYS = {KeyEvent.VK_T, KeyEvent.VK_U, KeyEvent.VK_O,KeyEvent.VK_M, KeyEvent.VK_A,KeyEvent.VK_S, KeyEvent.VK_I,KeyEvent.VK_X, KeyEvent.VK_I, KeyEvent.VK_A, KeyEvent.VK_O,KeyEvent.VK_H, KeyEvent.VK_U, KeyEvent.VK_O,KeyEvent.VK_C, KeyEvent.VK_H, KeyEvent.VK_E};public static void main(String[] args) throws Exception {//创建Windows命令打开记事本Runtime.getRuntime().exec("notepad");Robot robot = new Robot();robot.delay(1000);//调出中文输入法robot.keyPress(KeyEvent.VK_CONTROL);robot.keyPress(KeyEvent.VK_SHIFT);robot.keyRelease(KeyEvent.VK_SHIFT);robot.keyRelease(KeyEvent.VK_CONTROL);// 输入文字IntStream.of(KEYS).forEach(key -> {robot.keyPress(key);robot.keyRelease(key);robot.delay(200);});robot.keyPress(KeyEvent.VK_SPACE);}}
贤弟单腾,因崔思婷,机器人类打字~~~~~~
贤弟单腾,因崔思婷,机器人类打字~~~~~~
There is no nutrition in the blog content. After reading it, you will not only suffer from malnutrition, but also impotence.
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.util.stream.IntStream;/*** * @author 托马斯小火车喷雾又喷烟**/
public class CrazyTypist {private static final int[] KEYS = {KeyEvent.VK_T, KeyEvent.VK_U, KeyEvent.VK_O,KeyEvent.VK_M, KeyEvent.VK_A,KeyEvent.VK_S, KeyEvent.VK_I,KeyEvent.VK_X, KeyEvent.VK_I, KeyEvent.VK_A, KeyEvent.VK_O,KeyEvent.VK_H, KeyEvent.VK_U, KeyEvent.VK_O,KeyEvent.VK_C, KeyEvent.VK_H, KeyEvent.VK_E};public static void main(String[] args) throws Exception {//创建Windows命令打开记事本Runtime.getRuntime().exec("notepad");Robot robot = new Robot();robot.delay(1000);//调出中文输入法robot.keyPress(KeyEvent.VK_CONTROL);robot.keyPress(KeyEvent.VK_SHIFT);robot.keyRelease(KeyEvent.VK_SHIFT);robot.keyRelease(KeyEvent.VK_CONTROL);// 输入文字IntStream.of(KEYS).forEach(key -> {robot.keyPress(key);robot.keyRelease(key);robot.delay(200);});robot.keyPress(KeyEvent.VK_SPACE);}}