马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 Mike_python小 于 2020-4-14 12:12 编辑
求点评
上代码
import pyautogui as g
from tkinter import *
from tkinter import messagebox as gg
import time
from pyperclip import copy
import pyautogui as g
root = Tk()
root.title('连续发送器(怼人神器)')
root.geometry('400x200')
def paste(chinese):
copy(chinese)
g.hotkey('ctrl', 'v')
def a():
a_g = str(a.get())
b_g = int(b.get())
time.sleep(2)
#g.moveTo(1588, 802, duration = 1)
#g.click()
for i in range(b_g):
# 输入l like python
#g.typewrite(a_g)
paste(a_g)
# 按下回车
g.typewrite('\n')
b = Button(root, text = '发送(请先点击要发送的位置)', font = ('华文行楷', 18), bg = 'yellow', command = a)
b.place(x = 10, y = 90)
Label(root, text = ' 内容 ', font = ('华文行楷', 18), bg = 'yellow').place(x = 10, y = 10)
a = Entry(root, font = ('华文行楷', 18), bg = 'yellow', fg = 'blue')
a.place(x = 120, y = 10)
Label(root, text = '发送次数', font = ('华文行楷', 18), bg = 'yellow').place(x = 10, y =50)
b = Entry(root, font = ('华文行楷', 18), bg = 'yellow', fg = 'blue')
b.place(x = 120, y = 50)
root.mainloop()
使用方法:
先输入内容
再输入次数
然后点击要发送的地方
sleep2秒
发送
上图片 :
记得点评呀 |