功能更新
parent
2e03c701ba
commit
2f6de9d9d1
@ -1,28 +1,29 @@
|
||||
import random
|
||||
import time
|
||||
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 collect():
|
||||
# 按下ctrl
|
||||
pyautogui.keyDown("ctrl") # hold down the shift key
|
||||
time.sleep(random.random())
|
||||
for x, y in get_all_target():
|
||||
pyautogui.moveTo(x, y, random.random() / 20)
|
||||
time.sleep(random.random() / 20)
|
||||
pyautogui.leftClick()
|
||||
time.sleep(random.random())
|
||||
# 松开ctrl
|
||||
pyautogui.press("ctrl")
|
||||
def __call__(self, *args, **kwargs):
|
||||
# 按下ctrl
|
||||
pyautogui.keyDown("ctrl") # hold down the shift key
|
||||
time.sleep(random.random())
|
||||
for x, y in self.get_all_target():
|
||||
pyautogui.moveTo(x, y, random.random() / 20)
|
||||
time.sleep(random.random() / 20)
|
||||
pyautogui.leftClick()
|
||||
time.sleep(random.random())
|
||||
# 松开ctrl
|
||||
pyautogui.press("ctrl")
|
||||
|
||||
|
||||
|
@ -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…
Reference in New Issue