motionevent通过Shell执行touch或move事件
来源:互联网 发布:法国42编程学校 编辑:程序博客网 时间:2024/04/29 05:49
很多默认Android的input事件只有三个:
usage: input [text|keyevent]
input keyevent <event_code>
习惯用Shell写脚本跑自动化的人希望能够有touch事件或者拖拽事件,而motionevent恰好可以实现这个细节。如果系统默认input只能实现上述三个事件,可下载文件input.jar,链接地址:http://dl.dbank.com/c05pwz9srr。把他导入/system/framework/目录中,替代旧的input.jar文件。重新进入Shell后,输入input看看:
usage: input [text|keyevent]
input text <string>
input keyevent <event_code>
input motionevent <x> <y> <down|move|up>
input motionevent-batch <pointer-log>
可以把touch事件或者拖拽事件写为一个函数,用到的时候单独调用即可!
ex: input_motion(){
adb shell input motionevent x y down
adb shell input motionevent x y up
}
- motionevent通过Shell执行touch或move事件
- 触摸事件 Touch MotionEvent ACTION
- touch事件与MotionEvent(一)
- Android 简述touch事件中的MotionEvent
- Android 简述touch事件中的MotionEvent
- 通过bat或shell执行java代码
- 天天记录 - Android Touch事件学习 - 修改MotionEvent的值
- Touch Move
- Android中Touch事件中MOVE的优化
- convertView setOnTouchListener 监听不到 touch up,move等 事件
- Android中通过MotionEvent实现简单的单击事件
- 通过java执行shell脚本
- Android模拟MotionEvent事件
- MotionEvent 事件解读
- MotionEvent//动作事件
- MotionEvent 事件解读
- 触控事件MotionEvent
- crontab执行php或执行shell脚本
- 在公司工作站上编译openwrt 一个ionice命令
- js代码问题
- static变量 static函数
- Delphi 检测用户超过多长时间没有操作键盘或鼠标
- 今天用到的操作另一台服务器的数据库
- motionevent通过Shell执行touch或move事件
- 数据库字段取名为oracle数据库的关键字 :java.sql.SQLException: ORA-01747: user.table.column, table.column 或列说明无效
- 集智平台下拉数据集选值触发
- 第一次在项目中使用JQuery遇到的一点问题
- 省赛 总结
- Core Animation
- vi 复制粘贴
- Select模型与ioctlsocket的使用方法
- 举例说明什么是隐马尔科夫模型(HMM)