pyautogui 相关问题

pyautogui是一个跨平台的GUI自动化Python模块,用于以编程方式控制鼠标和键盘。

在将Pyautogui作为MU编辑器中的第三方模块安装时,我如何克服此错误? 我是在使用Python的无聊内容的最后一章中 - 第20章开始安装和导入Pyautogui,我一直无法实现这一目标。 我已经能够安装

Collecting pyautogui Using cached PyAutoGUI-0.9.54.tar.gz (61 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting pygetwindow>=0.0.5 Using cached PyGetWindow-0.0.9.tar.gz (9.7 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting mouseinfo Using cached MouseInfo-0.1.3.tar.gz (10 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting pymsgbox Using cached PyMsgBox-1.0.9.tar.gz (18 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting pyobjc-framework-quartz Using cached pyobjc_framework_Quartz-10.3.2-cp38-cp38-macosx_11_0_universal2.whl (211 kB) Collecting pyobjc-core Using cached pyobjc_core-11.0.tar.gz (994 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [2 lines of output] <string>:18: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html PyObjC: Need at least Python 3.9 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. FINISHED

回答 1 投票 0




Pyautogui,单击屏幕上的特定文本

夜晚,我想与Pyautogui创建一个代码,以做以下…… 找到一个将为“ 92%”的数字 在PC上有一个“跳过”按钮,每次都会更改数字! 我想要...

回答 1 投票 0

在那里,如果不干扰任何其他功能,就可以使该代码不是在第二个文件中垃圾邮件?尽管“ bandit.log”不是垃圾邮件...

import pyautogui import schedule import time import logging # Initialize a counter call_count = 0 # Example calls def logger(): logging.basicConfig(level=logging.INFO, filename="bandit.log", filemode="w", format="%(asctime)s - %(levelname)s - %(message)s") logger = logging.getLogger(__name__) logger.propagate = False handler = logging.FileHandler('anomaly.log') formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") handler.setFormatter(formatter) logger.addHandler(handler) try: location = pyautogui.locateOnScreen('1.png', confidence=0.9) if pyautogui.locateOnScreen('1.png', confidence=0.9): global call_count call_count += 1 logging.info(call_count) except pyautogui.ImageNotFoundException: pass def bandit_cycle(): try: location = pyautogui.locateOnScreen('1.png', confidence=0.9) logging.info('x1 Data found') time.sleep(1.5) except: pass # schedule for main working code schedule.every(1).seconds.do(bandit_main) # schedule for main working code schedule.every(1).seconds.do(logger) while True: schedule.run_pending() time.sleep(1)

回答 1 投票 0

如何使用pyautogui检测RGB值

pyautogui.displayMousePosition()

回答 2 投票 0




晚上好,我正在尝试使用随机方式让 pyautogui 点击!下面的例子

代码如下! 这是可行的,我正在使用“打印”功能来检查,但当时坐标位于 () 内部和“”之间。 如果有人可以帮助我,我将不胜感激 导入 pyautogui...

回答 1 投票 0

使用 Selenium 自动化 Chrome 扩展?

我尝试使用以下代码自动创建 chrome 扩展: 这是 chrome 扩展: https://chromewebstore.google.com/detail/email-hunter/mbindhfolmpijhodmgkloeeppmkhpmhc 这就是c...

回答 1 投票 0

PyAutoGui 重复错误的鼠标位置

我开始学习 PyAutoGui,我正在阅读文档并观看教程。现在,我只是尝试获取鼠标在屏幕上的位置,但它不断重复相同的坐标...

回答 2 投票 0

无法使用 pyautogui/win32api/pydirectinput 在游戏窗口内单击

我可以单击窗口,但它不会移动我的角色,也不会与游戏中的任何内容交互。我尝试过移动鼠标,尝试过键盘输入、全屏、窗口等。我...

回答 2 投票 0

python:如何导入 PyAutoGUI

导入pyautogui 我收到导入错误: 回溯(最近一次调用最后一次):   文件“”,第 1 行,位于   文件“/usr/local/lib/python3.7/site-packages/pyautogui/__ini...

回答 3 投票 0

在google colab中以UC模式使用seleniumbase

是否可以在google colab中以UC模式启动seleniumbase? 我使用此代码运行单元(之前没有使用该 colab 运行时运行其他单元): !sudo apt 更新 && sudo apt 升级...

回答 1 投票 0

我正在迭代列表并测试条件。如何返回指示哪个列表元素匹配的内容?

所以我们有以下函数,它的作用是找到与工作图像匹配的正确模板。 我们如何获得某种可比较的输出,以便稍后使用 if

回答 1 投票 0

寻找Python库来获取文本光标位置。不是鼠标指针位置

我正在寻找一个Python脚本来帮助我,如何获取TEXT光标的位置? 我不是在寻找鼠标指针位置。 通常很多 python 库都会帮你找到绳索...

回答 1 投票 0

在不同的计算机上以不同的分辨率运行Pyautogui

我有一个Python脚本,可以在我的工作计算机(1600 x 900分辨率)上完美运行。我在这台计算机上拍摄了 pyautogui.locateOnScreen 使用的所有屏幕截图。我尝试着去...

回答 3 投票 0

pyautogui / pyscreeze - 定位可以在没有区域参数的情况下工作,但在没有区域参数的情况下不起作用

使用 pyautogui,我试图在屏幕上找到图像。 这会找到图像(在分辨率为 2560x1440 的主显示器上),但需要近 5 秒: icon1 = pyautogui.locateOnScreen('[文件路径]\ic...

回答 3 投票 0

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.