Pyautogui uses the locateOnScreen function to always return None

if you use locateOnScreen according to the example, the None, image is returned as the downloaded image, as follows



:

according to the example, a coordinate should be put back, and if it is not identified, it should be returned to the None. But how could it not be recognized here?

there is another problem. Execute:

im2 = pyautogui.screenshot("my_screenshot.png")

where will the screenshot pictures be stored?

Mar.02,2021

(1) you need to add a time.sleep (2), and then run the code to replace the screen interface with the graphical web page
(2) in two seconds.
(2) it is just a cache and will be released


the picture you are looking for is a screenshot under windows (system tool).
the screenshot image is in the directory of the current script

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ba73-2c2bb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ba73-2c2bb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?