zoukankan      html  css  js  c++  java
  • python 操作手机

    https://blog.csdn.net/wave_1102/article/details/41630469

    import os
    import time
    import subprocess
    i = 0
    #每次操作的间隔时间取决于手机配置,配置越高时间越短
    # sleep_time = 0.5
    # while 1:
    #         #用popen设置shell=True不会弹出cmd框
    #         process = subprocess.Popen('adb shell input tap 14 1402',shell=True)
    #         time.sleep(sleep_time)
    #         process = subprocess.Popen('adb shell input keyevent KEYCODE_BACK', shell=True)
    #         time.sleep(sleep_time)
    #         process = subprocess.Popen('adb shell input tap 375 1402', shell=True)
    #         time.sleep(sleep_time)
    #         process = subprocess.Popen('adb shell input keyevent KEYCODE_BACK', shell=True)
    #         time.sleep(sleep_time)
    #        #os.system('adb shell input tap 14 1402')
    #         #os.system('adb shell input keyevent KEYCODE_BACK')
    #         #os.system('adb shell input tap 375 1402')
    #         i+=1
    #         print  str(i) + 'clicks have been completed'
    # os.system('adb shell input tap 100 100')
    process = subprocess.Popen('adb shell input tap 100 100',shell=True)
    time.sleep(5)
    process = subprocess.Popen('adb shell input tap 752 1919',shell=True)
    time.sleep(10)
    process = subprocess.Popen('adb shell input tap 607 465',shell=True)
    time.sleep(10)
  • 相关阅读:
    倒序三角形
    有时间了
    测试一个数是不是素数
    初学C++编写小程序
    N!的递归调用
    1+...+5的递归调用
    1!+....+5!
    菱形块
    23.git简单使用
    27.flask学习
  • 原文地址:https://www.cnblogs.com/snackpython/p/10310574.html
Copyright © 2011-2022 走看看