import os import time import random while True: x = random.randint(140, 1800) y = random.randint(100, 1000) adb1 = 'adb shell input tap ' + str(x) + ' ' + str(y) os.system(adb1) time.sleep(0.0005)