简体   繁体   English

我正在尝试使用 pyautogui 图像识别,我的退出代码为 0,但它不起作用

[英]i am trying to use pyautogui image recognition, and im coming out with a exit code of 0, but its not working

import pyautogui
import time
from time import sleep
import pyscreeze
def openchrome():
    sleep(5)
    chromeIcon = pyautogui.locateCenterOnScreen('C:\images\PngItem_333605.png')
    print(chromeIcon)
    pyautogui.doubleClick(chromeIcon)

Process finished with exit code 0 even the sleep is not working, the bot stops runing after a second or two.即使睡眠不工作,进程也以退出代码 0 结束,机器人在一两秒后停止运行。 thanks in advance!提前致谢!

Do you call the function openchrome further in the code?您是否在代码中进一步调用 function openchrome

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我正在尝试使用 pyautogui 并且它给了我这个错误 - I am trying to use pyautogui and its giving me this error 使用 pyautogui 进行 Python 图像识别 - Python image recognition with pyautogui 图像识别-pyautogui - Image Recognition - pyautogui 我的代码无法正常工作并且卡住了 - I am having issues with my code working properly and im stuck 我正在尝试制作一个循环,但它不工作 - i am trying to make a loop but its not working 我试图计算 model object 但它不起作用 - im trying to count model object but its not working 代码不起作用。 我试图点击页面上带有 id 号的元素,但我不能 - Code not working. I am trying to click an element on a page with its id number but i cant 如何在 pyautogui 中打开 chrome 新标签页。 我没有收到任何错误,但代码不起作用 - How to open chrome new tab in pyautogui. i am not getting any error but code is not working 我正在尝试每天在特定时间执行我的代码但它不起作用 - I am trying to execute my code at a certain time every day and its not working 我试图从 clrs 书中实现队列,但它没有按预期工作? 我的代码有什么问题 - Im trying to implement queue from clrs book ,but its not working as expected ? whats wrong with my code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM