package com.bigdata.java;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.event.KeyEvent;
public class QQBoom {
public static void main(String[] args) throws AWTException {
String str = "需要发送的消息" ;
Robot robot = new Robot();
Clipboard SystemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
StringSelection text = new StringSelection(str);
SystemClipboard.setContents(text, null);
for (int i = 0; i < 100; i++) { //输入发送次数
robot.keyPress(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyRelease(KeyEvent.VK_V);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
robot.delay(1000);
}
}
}
消息连发
最新推荐文章于 2024-09-01 15:30:33 发布