asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.22k stars 1.24k forks source link

suggestion for confidence matching with pyautogui #646

Open addohm opened 2 years ago

addohm commented 2 years ago

I'd really like to be able to pull the actual confidence value of a match without having to repeatedly test for limits. This is especially important for changing haystack images.

button7location, confidence = pyautogui.locateOnScreen('calc7key.png', confidence=0.9)