前言我们都知道,因为疫情,大家不能上学,不能上班。“钉钉”APP发挥了重要作用。学校开启了学生成就的“钉钉”之路。老师也成为了一名“合格”的主播,这多亏了XXX童鞋的馈赠,以及666的扣扣。为了营造良好的学习环境,直播方式也别具一格。钉钉有哪些功能可供大众使用?为什么写钉钉登录?其实我是个早起早睡的乖宝宝,不需要。至于为什么写这个剧本,是因为加班。工作完成后还有10分钟下班,所以用10分钟学习(假装)(一)练习(B)。废话少说,快下班。我们直接开始吧。让我们谈谈这个想法。使用python调用adb命令通过x、y点操作手机。写一个定时器就可以了,很简单。10分钟够了...准备环境安卓手机(我用的是华为荣耀10)adb工具包,下载安装包配置环境变量python3环境安装adb配置环境变量下载adb??:网上太多了,随便找一个吧,我要和时间赛跑了(>_<...)配置环境变量:这是基础,这里不打算讲python环境配置,adb配置adb--version和勾选设置手机数据线连接电脑。打开手机上的开发者模式,输入adbdevices,会出现下图,表示连接手机进行设置。在开发者模式下,找到指针位置选项并打开。用于编写脚本获取点信息。写之前需要了解adb常用命令a,adbshellinputkeyevent224#Powerb,adbshellinputtap6471685#点击事件c,adbshellinputswipe7471413747323#Swipeeventd,adbshellamforce-stopcom.alibaba.android.rimet关闭导入钉钉进程所需的包importosimporttime。手动操作一下,不记录每一步的x,y点,然后用python写defdaka():print(os.system('adbshel??linputkeyevent224'))#Turnonthepowerbuttontime.sleep(3)print(os.system('adbshel??linputtap6471685'))#点击钉钉应用位置time.sleep(3)print(os.system('adbshel??linputtap5282190'))#点击钉钉菜单time.sleep(3)print(os.system('adbshel??linputswipe7471413747323'))#上滑找到考勤打卡程序我就是想写开场操作,打不开,还要加班,省人事小姐姐找我喝咖啡,很简单,这一步自己写,**我跳过**"""print(os.system('adbshel??lamforce-stopcom.alibaba.android.rimet'))#Operationsignoff完成后Nailapplicationpasshowtocheckthepackagenameadbshel??lammonitor然后在手机上打开应用进行截图,真的很费时间,感觉时间不多了,不如等会儿录屏...好像已经搞定了...随便写个Timer吧,可以自己优化定时器,我写的比较粗糙..."""定义一个返回秒的函数"""defsleeptime(hour,min,sec):returnhour*3600+min*60+sec#设置自动执行间隔时间,我这里设置时间,啊!现在是凌晨12点,我9点上班早上一点,所以让下一次在8小时后执行second=sleeptime(8,0,0)#来个暴力死循环while1==1:#Delaytime.sleep(second)#执行daka(),来个代码总结#-*-coding:utf-8-*-'''@Createdon2019/12/20@Author:PaLengderen'''#引入时间包importosimporttimedefdaka():print(os.system('adbshel??linputkeyevent224'))#Powerbuttontime.sleep(3)print(os.system('adbshel??linputtap6471685'))#点击钉钉应用time.sleep(3)print(os.system('adbshel??linputtap5282190'))#点击菜单time.sleep(3)print(os.system('adbshel??linputswipe7471413747323'))#向上滑动时间.sleep(3)print(os.system('adbshel??linputtap9101011'))#点击签到时间.sleep(3)print(os.system('adbshel??lamforce-stopcom.alibaba.android.rimet'))pass#functiondefinitiondefsleeptime(hour,min,sec):print(hour*3600+min*60+sec)returnhour*3600+min*60+sec#设置自动执行间隔,我设置的是2ssecond=sleeptime(0,0,10)#无限循环while1==1:#delaytime.sleep(second)#executedaka()ontopAmobile手机录屏器手动录屏(⊙﹏⊙),突然发现钉钉个人信息太多,我要食言了!!!尴尬