我正在尝试使用 lakey 库来执行 gui 自动化任务
import lackey
import time
# pattern for lackey
pattern = lackey.Pattern(r'C:\Users\rainman\Desktop\myfolder\myPicture.png')
# define main screen
screen = lackey.Screen()
# find element on a screen
screen.find(pattern) # error
但我发现了一些问题:
Traceback (most recent call last):
hdc = self._gdi32.CreateDCA(ctypes.c_char_p(device_name), 0, 0, 0)
TypeError: bytes or integer address expected instead of str instance
当我尝试打电话时也会发生这种错误
screen.click(pattern)
或者
screen.capture()