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)
  • 相关阅读:
    hdu 3085
    hdu 3295 模拟过程。数据很水
    hdu 2181 水搜索
    pku ppt some problem
    2-sat
    The 2014 ACM-ICPC Asia Mudanjiang Regional First Round
    nenu contest3
    The 10th Zhejiang Provincial Collegiate Programming Contest
    最小费用最大流
    多源最短路
  • 原文地址:https://www.cnblogs.com/snackpython/p/10310574.html
Copyright © 2011-2022 走看看