0

How can I use the PyAutoGUI function "LocateOnScreen()" in Autopy in order to clicking in an image? Any example? There is few documentation. I cannot use Pyautogui in my new laptop and I building a bot to clicking in different images moving on the screen.

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

  • 3
    please add the code you have – DanielM Jul 09 '19 at 15:28
  • `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 "", line 1, in Imageclick=autopy.mouse.click(Image) TypeError` – Peripatein Jul 09 '19 at 16:39

1 Answers1

0
import autopy 

Image=autopy.bitmap.Bitmap.open('C:\\Users\\carlo\\Desktop\\prueba\\Captura.png') #not need to open image
autopy.mouse.smooth_move(x,y) #set x,y image in screen for move mouse to image
autopy.mouse.click() # is func not get a image, set empty or ..
ali naderi
  • 19
  • 2