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

DOC question: Is `onScreen` also meant to check if an image is on screen? #729

Open Avasam opened 2 years ago

Avasam commented 2 years ago

onScreen's docstring only mentions coordinates, but it directly uses _normalizeXYArgs. So it can also check if an image from filename is on the primary screen by passing a string as the x / first argument. Is that intended? Should I be relying on that behavior for the foreseeable future? Should the docstring be updated?

>>> from pyautogui import onScreen
>>> onScreen('C:/Users/Avasam/Desktop/autosplit test/1 {p}.png')
True