2021,shell脚本手机微信8.0,微信运动,自动点赞小伙伴的一些总结

#!/usr/bin/bash
#这是微信运动自动点击程序
#原理就是利用adb获取布局,来模拟点击小红心
exit_game()
{
	echo "等待5秒后退出应用"
	sleep 5
	exit 0
}
RST="$(tput sgr0)"
RED="${RST}$(tput setaf 1)"
BRED="${RST}$(tput bold)$(tput setaf 1)"
GREEN="${RST}$(tput setaf 2)"
YELLOW="${RST}$(tput setaf 3)"
BYELLOW="${RST}$(tput bold)$(tput setaf 3)"
BLUE="${RST}$(tput setaf 4)"
CYAN="${RST}$(tput setaf 6)"
BCYAN="${RST}$(tput bold)$(tput setaf 6)"
ICYAN="${RST}$(tput sitm)$(tput setaf 6)"

clear
runadb=$(adb connect localhost:5555 2>&1)
#echo runadb: ${runadb} \n\n
error_info="error:"
refused_info="refused"
if_contains_error_info=$(echo ${runadb} | grep "${error_info}") 
if_contains_refused_info=$(echo ${runadb} | grep "${refused_info}")
if [[ "$if_contains_error_info" != "" ]] ||  [[  "$if_c

猜你喜欢

转载自blog.csdn.net/babytiger/article/details/117546314