基于airtest的全民旺财辅助

简介: 基于airtest的全民旺财辅助

airtest找图切图比较便利但是兼容性不太好

他也有个poco的找控件模式

代码初级没啥东西 主要是学习的一个记录吧 先记录下 看看学习过程的变化

# -*- encoding=utf8 -*-
__author__ = "Administrator"
from airtest.core.api import *
from airtest.core.api import *
from airtest.core.android.android import Android
from poco.drivers.unity3d import UnityPoco
import random
auto_setup(__file__)
keyevent("home")
touch(Template(r"tpl1639543860629.png", record_pos=(0.116, 0.095), resolution=(1080, 1920)))
sleep(random.randint(8,10)) #等一会防止app加载ad慢
while 1:
    try:
        if  exists(Template(r"tpl1639550991634.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639543931652.png", record_pos=(0.269, -0.633), resolution=(1080, 1920)))
        if  exists(Template(r"tpl1639546343664.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639546343664.png", record_pos=(-0.06, -0.34), resolution=(1080, 1920)))
        if  exists(Template(r"tpl1639543977218.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639543977218.png", record_pos=(-0.008, -0.34), resolution=(1080, 1920)))
            sleep(random.randint(60,65)) #等一会防止app加载ad慢
        if  exists(Template(r"tpl1639546473137.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639546473137.png", record_pos=(0.007, -0.334), resolution=(1080, 1920)))
            sleep(random.randint(60,65)) #等一会防止app加载ad慢
        if exists(Template(r"tpl1639560033199.png", record_pos=(0.362, -0.756), resolution=(1080, 1920))):
            touch(Template(r"tpl1639560033199.png", record_pos=(0.003, 0.327), resolution=(1080, 1920)))
        if exists(Template(r"tpl1639562630593.png", record_pos=(0.362, -0.756), resolution=(1080, 1920))):    
            touch(Template(r"tpl1639562630593.png", record_pos=(0.015, 0.406), resolution=(1080, 1920)))
        if exists(Template(r"tpl1639558318555.png", record_pos=(0.362, -0.756), resolution=(1080, 1920))):
            touch(Template(r"tpl1639558318555.png", record_pos=(0.397, -0.795), resolution=(1080, 1920)))
        if  exists(Template(r"tpl1639544062808.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639544062808.png", record_pos=(0.397, -0.795), resolution=(1080, 1920)))
        if  exists(Template(r"tpl1639544076420.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639544076420.png", record_pos=(0.394, -0.798), resolution=(1080, 1920)))
        if  exists(Template(r"tpl1639544099741.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639544099741.png", record_pos=(0.38, -0.603), resolution=(1080, 1920)))
        if  exists(Template(r"tpl1639544114198.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639544114198.png", record_pos=(0.378, -0.597), resolution=(1080, 1920)))
#         if exists(Template(r"tpl1639558483557.png", record_pos=(0.474, -0.787), resolution=(1080, 1920)))
#             touch(Template(r"tpl1639558483557.png", record_pos=(0.378, -0.597), resolution=(1080, 1920)))
        if  exists(Template(r"tpl1639544127658.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639544127658.png", record_pos=(0.001, 0.04), resolution=(1080, 1920)))
        if  exists(Template(r"tpl1639546286735.png", record_pos=(-0.152, -0.644), resolution=(1080, 1920))):
            touch(Template(r"tpl1639546286735.png", record_pos=(-0.003, 0.044), resolution=(1080, 1920)))
    except Exception as e:
        print("执行过程出现错误" + str(e))

 

目录
相关文章
|
5月前
|
缓存 Android开发
基于autojs7的亚丁号点淘辅助
基于autojs7的亚丁号点淘辅助
84 0
|
5月前
|
文字识别 小程序 测试技术
网易私有云新增的测试驱动力,Airtest-ocr文字识别点击真香!
网易私有云新增的测试驱动力,Airtest-ocr文字识别点击真香!
367 0
|
数据可视化 Ubuntu Linux
研发实用工具,推荐一款代码统计神器GitStats
研发实用工具,推荐一款代码统计神器GitStats
1303 0
研发实用工具,推荐一款代码统计神器GitStats
|
人工智能 机器人 大数据
电销机器人工作的原理——源代码搭建系统
随着人工智能的普及,博主从事多年AI技术,外呼中心搭建,需要演示站或技术支持联系博主。AI已经渗透到各行各业,智能电话机器人就是充分的利用了人工智能语音识别技术和大数据的精准分析定位,完全是对传统模式是一次颠覆性的变化,是智能化的人海战术还是时代化的“人工+智能语音”的一种方式,智能电话机器人是企业的福音!帮企业降低成本,提高工作效率,提升公司业绩!
|
2月前
|
数据采集 机器学习/深度学习 搜索推荐
【2023钉钉杯复赛】A题 智能手机用户监测数据分析 Python代码分析
本文介绍了2023钉钉杯复赛A题的智能手机用户监测数据分析,包括数据预处理、特征提取、推荐模型建立与评价的Python代码实现,旨在通过用户使用记录预测APP使用情况并建立推荐系统。
59 0
【2023钉钉杯复赛】A题 智能手机用户监测数据分析 Python代码分析
|
4月前
|
物联网 数据处理 数据安全/隐私保护
程序与技术分享:BL602&BL604综合项目2:dolphin蓝牙跳蛋
程序与技术分享:BL602&BL604综合项目2:dolphin蓝牙跳蛋
|
4月前
|
传感器 安全 Go
程序与技术分享:3D打印机如何添加自动调平功能
程序与技术分享:3D打印机如何添加自动调平功能
78 0
|
人工智能 索引 Python
python智能ai联系人管理课程设计源码汉王云名片识别
python智能ai联系人管理课程设计源码汉王云名片识别
259 0
|
Python
现场打脸:如何使用Selenium批量上传文件?
现场打脸:如何使用Selenium批量上传文件?
192 0
|
机器学习/深度学习 存储 自然语言处理
笔记本就能玩的ChatGPT平替,附完整版技术报告
笔记本就能玩的ChatGPT平替,附完整版技术报告
下一篇
无影云桌面