java如何实现qq发送消息
2021-03-07 20:27
标签:select 代码 nts cti ble release pack 字符串 contents 结果 发送成功 java如何实现qq发送消息 标签:select 代码 nts cti ble release pack 字符串 contents 原文地址:https://www.cnblogs.com/xiaozhounandu/p/14255254.html有一天,你老婆要你给他发1000次我爱你,怎么实现呢?
相关代码如下
package com.jie;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
import java.awt.event.KeyEvent;
/**
* @author wei zhijie
* @version 1.0
* @date 2021/1/9
*/
public class qq {
public static void main(String[] args) throws AWTException {
String sentence ="老婆,爱你爱你啊";
Robot robot = new Robot();
robot.delay(3000);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
//根据字符串分割
String[] authon=sentence.split("[,]");
for (int j = 0; j