2015-10-30-01-Windows批处理编写心得
来源:互联网 发布:传奇霸业轮回降级数据 编辑:程序博客网 时间:2024/06/06 02:47
- bat 批处理取年月日时分秒毫秒
- Windows下直接定位到文件文件夹bat批处理编写
- 使用adb自动获取log
- adb发送广播Broadcast
- 编写自动延时发送循环键值的bat批处理
bat 批处理-取年、月、日、时、分、秒、毫秒
取年份:echo %date:~0,4%
取月份:echo %date:~5,2%
取日期:echo %date:~8,2%
取星期:echo %date:~10,6%
取小时:echo %time:~0,2%
取分钟:echo %time:~3,2%
取秒:echo %time:~6,2%
取毫秒:echo %time:~9,2%
Windows下直接定位到文件/文件夹bat批处理编写
- 打开资源管理器
explorer /e,C:\Documents and Settings\Administrator\桌面\Inbox
- 打开文件夹
explorer ,C:\Documents and Settings\Administrator\桌面\Inbox
- 直接定位文件夹
explorer /select,C:\Documents and Settings\Administrator\桌面\Inbox
- 直接定位文件
explorer /select,C:\Documents and Settings\Administrator\桌面\Inbox\字母排序新.jpg
使用adb自动获取log
del log.logadb logcat -cadb logcat -v time log.log > log.log@pause
logcat -v time 打印Android系统当前时间到log中
adb发送广播Broadcast
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED@pause
可以更精确的发送到某个package,如下:
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n package_name/class_name
编写自动延时发送循环键值的bat批处理
@echo off:startset /a var+=1echo %var% echo inputKeyEvent:Left(21) adb shell input keyevent 21 start /min /w mshta vbscript:setTimeout("window.close()",5000) adb shell procrank >> .\procrank.log echo inputKeyEvent:Right(22) adb shell input keyevent 22 start /min /w mshta vbscript:setTimeout("window.close()",5000) adb shell procrank >> .\procrank.logif %var% leq 100000 GOTO startpause
0 0
- 2015-10-30-01-Windows批处理编写心得
- Windows BAT批处理编写要点
- windows中批处理命令的编写
- 编写批处理
- 如何编写Bat脚本(Windows批处理脚本)
- Windows 10 使用心得
- 学习批处理的心得
- DOS批处理命令心得
- 批处理使用心得
- 学习批处理的心得
- 学习批处理的心得
- 学习批处理的心得
- 学习批处理的心得
- windows批处理
- windows批处理
- Windows批处理
- windows批处理
- windows批处理
- 软考二——程序设计语言
- WIDECHARTOMULTIBYTE和MULTIBYTETOWIDECHAR函数的用法
- 点击单元格操作
- LeetCode 136: Single Number
- 常用User Agent整理
- 2015-10-30-01-Windows批处理编写心得
- android studio 打包 删除unaligned(没有对齐的包)
- UILable,UIButton的富文本显示
- Android学习之ProgressDialog
- 图解VS2010 Remote Debug
- PHP获取当前页面的URL
- c/c++中运行外部程序
- 【iOS】Swift GCD-上
- SSH之邮箱激活