From 9fca3fe734fb612f7ff7a59286f01683fb84e316 Mon Sep 17 00:00:00 2001 From: bird00101011 Date: Mon, 1 Jul 2024 22:26:33 +0800 Subject: [PATCH] Add param for locateOnWindow --- pyscreeze/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyscreeze/__init__.py b/pyscreeze/__init__.py index a8dd81a..441a049 100644 --- a/pyscreeze/__init__.py +++ b/pyscreeze/__init__.py @@ -486,11 +486,11 @@ def locateCenterOnScreenNear(image, x, y, **kwargs): @requiresPyGetWindow -def locateOnWindow(image, title, **kwargs): +def locateOnWindow(image, title, equal_or_in='in', **kwargs): """ TODO """ - matchingWindows = pygetwindow.getWindowsWithTitle(title) + matchingWindows = pygetwindow.getWindowsWithTitle(title, equal_or_in=equal_or_in) if len(matchingWindows) == 0: raise PyScreezeException('Could not find a window with %s in the title' % (title)) elif len(matchingWindows) > 1: