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)
  • 相关阅读:
    hdu2818 Building Block
    struct2面试准备
    Spring mvc 面试
    Spring 面试详解
    Java面试必备Springioc上
    redis高级命令4 持久化机制 、事务
    redis高级命令3哨兵模式
    redis高级命令2
    redis高级命令1
    redis基础二----操作set数据类型
  • 原文地址:https://www.cnblogs.com/snackpython/p/10310574.html
Copyright © 2011-2022 走看看