Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

How to use python to control the mouse playing games on "msi app player"

$
0
0

I'm using Python to control the mouse to do some autoclicking on an Android Emulator.I am using pyautogui and PyDirectInput to control the mouse; however after the mouse moves onto the emulator the click() function runs but does not work and no clicking occurs, no error either.

Here are the clicking functions and the main loop:

import pyautogui as piimport timeimport pydirectinput as pyddef click_shit(x, y):    pyd.moveTo(x,y)    for i in range(0,200,1):        pyd.click()        time.sleep(0.04)def click_reload(x,y,x2,y2):    pyd.moveTo(x,y)    pyd.click()    time.sleep(0.5)    pyd.moveTo(x2,y2)    pyd.click()  while 1 :     click_shit(x, y)     time.sleep(3)     click_reload(x,y,x2,y2)     time.sleep(1) 

Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>