使用Lackey库进行Python自动化

时间:2017-01-16 14:43:39

标签: python python-3.x automation lackey

我正在尝试使用lackey库进行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()

1 个答案:

答案 0 :(得分:1)

好吧,在我的问题上找到了答案,这是0.5.2版本中已知的错误

作者已经修好了。