pythonpython-3.xautomationlackey

Python automation with Lackey library


i'm trying to use lackey library for gui automation tasks

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

but i found some issue:

    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

That's error also happens when i'm trying to call

screen.click(pattern)

or

screen.capture()

Solution

  • Well, found the answer on my question, that was a known bug in version 0.5.2

    Author has fixed it already.