Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions findAny and find...List are missing #148

Open
jfthuong opened this issue Mar 25, 2019 · 2 comments
Open

Functions findAny and find...List are missing #148

jfthuong opened this issue Mar 25, 2019 · 2 comments

Comments

@jfthuong
Copy link

jfthuong commented Mar 25, 2019

Hi,

Awesome module.

I have noticed several functions are missing (implemented in Sikulix but not lackey):

  • findAllList
  • findBestList
  • findAny
  • findAnyList

Here is the documentation found in Sikulix:

   findAllList() # same as findAll(), but returns a list (Java: List<Match>) sorted by score descending

.. py:method:: findBestList(ListPS)

	:param ListPS: a Tuple/List containing one or more image filenames and/or patterns 
	:return: a :py:class:`Match` object that contains the best match or None if no image was found at all

	Use ``match.getIndex()`` to identify the best image from the image-list (index zero-based).

.. py:method:: findAny(PS...)

	:param PS...: one or more image filenames and/or patterns as a variable parameterlist
	:return: a list of matches for the images found
	
	Use ``match.getIndex()`` to identify the corresponding image from the list of images (index left to right, zero-based). See example above about how to access the returned list.

.. py:method:: findAnyList(ListPS)

	:param ListPS: a Tuple/List containing one or more image filenames and/or patterns 
	:return: a list of matches for the images found

	Use ``match.getIndex()`` to identify the best image from the image-list (index zero-based). See example above about how to access the returned list.
@jfthuong
Copy link
Author

Additionnally, the function findBest can have several arguments in Sikulix (and not only one in lackey):

.. py:method:: findBest(PS...)

	:param PS...: one or more image filenames and/or patterns as a variable parameterlist
	:return: a :py:class:`Match` object that contains the best match or None if no image was found at all
	
	Use ``match.getIndex()`` to identify the best image from the list of images (index left to right, zero-based).
def findBest(self, pattern):
    """ Returns the *best* match in the region (instead of the first match) """
....

@glitchassassin
Copy link
Owner

Thanks! These look like they are probably features added since the initial implementation of Lackey. I'm not sure when I'll get around to reviewing & updating for the new features, but someone else can feel free to take a crack at it in the mean time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants