用户:
边城过客查看:35 回复:14 评论:35 创建时间:2022-12-15T15:08:38
嗨嗨!

最近狐狸出新作了)))

https://shequ.codemao.cn/work/171301000
———————————————————————————————————————
很好,又是一个费肝的作品。
我玩了以后进行了思考,
———这个世界没有手速是不行的
于是我看到了Python中的pyautogui库,
整活时间到!!

1.连续点击
def mouse():
b = input('请问需要点击多少下?')
b = int(b)
c = input('点击左键还是右键?\n左键请输入0,右键输入1:')
c = int(c)
print('请注意:您需要在10秒内将鼠标移动到需要连点的地方,然后不要动,等待开始快速连点。')
sleep(10)
print('开始点击!')
x, y = pag.position()
d = 'left'
if c:
d = 'right'
e = time()
for i in range(0, b):
pag.click(x, y, button=d)
f = time() - e
input('完成。用时%f秒。' % f)
2.连续输入
def key():
print('请在以下支持的按键中挑选点需要的键。')
for i in pag.KEYBOARD_KEYS:
print(r'%s' % i, end=' ')
b = input('\n请输入您需要快速输入的字符:')
if b in pag.KEYBOARD_KEYS:
c = input('请输入您需要多少次输入:')
c = int(c)
print('请注意,您需要在10秒内切换到需要输入的窗口。')
sleep(10)
print('开始工作!')
e = time()
for i in range(0, c):
pag.press(b)
f = time() - e
input('完成。用时%f秒。' % f)
else:
input('输入的字符不属于支持字符,请修改。')
try:
a = input('输入您需要的服务(数字):\n1:快速连点\n2:快速输入\n>>> ')
a = int(a)
if a == 1:
mouse()
elif a == 2:
key()
else:
input('不好意思,没有找到您需要的服务。\n')
except Exception as e:
print('错误;\n', e)
3.优化(全部源码)
import pyautogui as pag
from time import sleep, time
pag.PAUSE = 0
def mouse():
b = input('请问需要点击多少下?')
b = int(b)
c = input('点击左键还是右键?\n左键请输入0,右键输入1:')
c = int(c)
print('请注意:您需要在10秒内将鼠标移动到需要连点的地方,然后不要动,等待开始快速连点。')
sleep(10)
print('开始点击!')
x, y = pag.position()
d = 'left'
if c:
d = 'right'
e = time()
for i in range(0, b):
pag.click(x, y, button=d)
f = time() - e
input('完成。用时%f秒。' % f)
def key():
print('请在以下支持的按键中挑选点需要的键。')
for i in pag.KEYBOARD_KEYS:
print(r'%s' % i, end=' ')
b = input('\n请输入您需要快速输入的字符:')
if b in pag.KEYBOARD_KEYS:
c = input('请输入您需要多少次输入:')
c = int(c)
print('请注意,您需要在10秒内切换到需要输入的窗口。')
sleep(10)
print('开始工作!')
e = time()
for i in range(0, c):
pag.press(b)
f = time() - e
input('完成。用时%f秒。' % f)
else:
input('输入的字符不属于支持字符,请修改。')
try:
a = input('输入您需要的服务(数字):\n1:快速连点\n2:快速输入\n>>> ')
a = int(a)
if a == 1:
mouse()
elif a == 2:
key()
else:
input('不好意思,没有找到您需要的服务。\n')
except Exception as e:
print('错误;\n', e)
你学会了吗?
边城过客import pyautogui as pag
from time import sleep, time
pag.PAUSE = 0
def mouse():
b = input('请问需要点击多少下?')
b = int(b)
c = input('点击左键还是右键?\n左键请输入0,右键输入1:')
c = int(c)
print('请注意:您需要在10秒内将鼠标移动到需要连点的地方,然后不要动,等待开始快速连点。')
sleep(10)
print('开始点击!')
x, y = pag.position()
d = 'left'
if c:
d = 'right'
e = time()
for i in range(0, b):
sleep(0.2)
pag.click(x, y, button=d)
f = time() - e
input('完成。用时%f秒。' % f)
def key():
print('请在以下支持的按键中挑选点需要的键。')
for i in pag.KEYBOARD_KEYS:
print(r'%s' % i, end=' ')
b = input('\n请输入您需要快速输入的字符:')
if b in pag.KEYBOARD_KEYS:
c = input('请输入您需要多少次输入:')
c = int(c)
print('请注意,您需要在10秒内切换到需要输入的窗口。')
sleep(10)
print('开始工作!')
e = time()
for i in range(0, c):
pag.press(b)
f = time() - e
input('完成。用时%f秒。' % f)
else:
input('输入的字符不属于支持字符,请修改。')
try:
a = input('输入您需要的服务(数字):\n1:快速连点\n2:快速输入\n>>> ')
a = int(a)
if a == 1:
mouse()
elif a == 2:
key()
else:
input('不好意思,没有找到您需要的服务。\n')
except Exception as e:
print('错误;\n', e)
数米专用:
点赞2
评论