在图像中单击Autopy

2024-10-01 07:46:52 发布

您现在位置:Python中文网/ 问答频道 /正文

如何在Autopy中使用PyAutoGUI函数“LocateOnScreen()”来单击图像?有什么例子吗?文件很少。我不能在我的新笔记本电脑中使用Pyautogui,我正在构建一个机器人来点击屏幕上移动的不同图像。你知道吗

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. 

>>> import autopy 

>>> Image=autopy.bitmap.Bitmap.open('C:\\Users\\carlo\\Desktop\\prueba\\Captura.png') 

>>> Imageclick=autopy.mouse.click(Image) 

Traceback (most recent call last): 
  File "<pyshell#4>", line 1, in <module> 
    Imageclick=autopy.mouse.click(Image) 
TypeError


Tags: 文件函数图像image机器人例子笔记本电脑click