功能更新

main
阳光少年 3 months ago
parent 2e03c701ba
commit 2f6de9d9d1

@ -1,28 +1,29 @@
import random import random
import time import time
import pyautogui import pyautogui
TARGET = (1935, 615)
class Collect:
def __init__(self, target=(1935, 615)):
self.target = target
def get_all_target(self):
for i in range(12):
x = self.target[0] + 52 * i
for j in range(5):
y = self.target[1] + 52 * j
yield x, y
def get_all_target():
for i in range(12):
x = TARGET[0] + 53 * i
for j in range(5):
y = TARGET[1] + 53 * j
yield x, y
def __call__(self, *args, **kwargs):
def collect(): # 按下ctrl
# 按下ctrl pyautogui.keyDown("ctrl") # hold down the shift key
pyautogui.keyDown("ctrl") # hold down the shift key time.sleep(random.random())
time.sleep(random.random()) for x, y in self.get_all_target():
for x, y in get_all_target(): pyautogui.moveTo(x, y, random.random() / 20)
pyautogui.moveTo(x, y, random.random() / 20) time.sleep(random.random() / 20)
time.sleep(random.random() / 20) pyautogui.leftClick()
pyautogui.leftClick() time.sleep(random.random())
time.sleep(random.random()) # 松开ctrl
# 松开ctrl pyautogui.press("ctrl")
pyautogui.press("ctrl")

@ -1,20 +1,44 @@
import time import time
import random import random
import winsound
from pynput import keyboard, mouse from pynput import keyboard, mouse
from start import get_start from start import get_start
import threading import threading
import pyautogui import pyautogui
from collect import collect, get_all_target from collect import Collect
pyautogui.FAILSAFE = True pyautogui.FAILSAFE = True
pyautogui.PAUSE = 0.02 pyautogui.PAUSE = 0.02
SOURCE = (490, 400) SOURCE = (490, 400)
collect = Collect()
def listener_keyword():
def on_press(key):
global collect, SOURCE
try:
if key.char == "1":
SOURCE = pyautogui.position()
# 得到当前鼠标位置
print(pyautogui.position())
winsound.Beep(800, 200)
elif key.char == "2":
collect = Collect(pyautogui.position())
print(pyautogui.position())
winsound.Beep(800, 200)
except AttributeError:
pass
with keyboard.Listener(on_press=on_press) as listener:
listener.join()
threading.Thread(target=listener_keyword, daemon=True).start()
def rep():
for x, y in get_all_target():
def rep(collect: Collect):
for x, y in collect.get_all_target():
# 鼠标移动到SOURCE # 鼠标移动到SOURCE
pyautogui.moveTo(SOURCE[0], SOURCE[1], random.random() / 5) pyautogui.moveTo(SOURCE[0], SOURCE[1], random.random() / 5)
time.sleep(random.random() / 30) time.sleep(random.random() / 30)
@ -31,10 +55,12 @@ def rep():
pyautogui.leftClick() pyautogui.leftClick()
while True: while True:
time.sleep(0.1)
if get_start() == False: if get_start() == False:
continue continue
rep() rep(collect)
collect() collect()
collect() collect()

@ -0,0 +1,39 @@
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['开隐匿圣甲虫或命运卡.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='开隐匿圣甲虫或命运卡',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['QQ图片20241007140402.jpg'],
)
Loading…
Cancel
Save