import time import random import pyautogui import base x, y = base.first() driedFishPosition = [ [60, 320], [380, 340], [200, 650], [145, 400], [85, 400], [340, 510], ] for origin in driedFishPosition: origin[0] = origin[0] + x origin[1] = origin[1] + y def pickUpDriedFish(mouseMoveSpeed): for items in driedFishPosition: pyautogui.moveTo(items[0], items[1], mouseMoveSpeed) pyautogui.click()
import pyautogui import time import base import move x ,y, r, b = base.first() driedFishPosition = [ [50, 270], [305, 233] ] potPosition = [ [136, 411], [226, 546], [311, 405], [226, 546], [135, 525], [226, 546], [311, 525], [226, 546] ] def pickUpDriedFish(): for items in driedFishPosition: move.click(items[0], items[1])
# -*- encoding: utf-8 -*- import time import pyautogui as pag import base try: while True: print("Press Ctrl-C to end") screenWidth, screenHeight = pag.size() # 获取屏幕的尺寸 x1, y1, r, b = base.first() x, y = pag.position() # 返回鼠标的坐标 print("Screen size: (%s %s), Position : (%s, %s)\n" % (screenWidth, screenHeight, x - x1, y - y1)) # 打印坐标 time.sleep(1) # 每个1s中打印一次 , 并执行清屏 except KeyboardInterrupt: print('end')