Answer the question
In order to leave comments, you need to log in
Instead of code execution details, it writes Process finished with exit code 0. What should I do?
In videos on YouTube, when executing the pyautogui.locateCenterOnScreen () command in brackets, it gives the coordinates of the point, but I just have information that the program has been completed and that's it. At the same time, no actions are performed, the program does not look for that part of the screenshot that I indicate to it. How is this problem solved?
Answer the question
In order to leave comments, you need to log in
For something to exist, you need to not just call functions, but store the result they return somewhere.
btn1 = pyautogui.locateOnScreen("...")
btn1_center = pyautogui.center(btn1)
pyautogui.click(*btn1_center)
# насколько понимаю, можно напрямую кликнуть там, где найдет иконку
pyautogui.click("my_icon.jpg")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question