AIRTEST 剑与远征 推图脚本

AIRTEST 剑与远征 推图脚本

# -*- encoding=utf8 -*-
__author__ = "kangpc"

from airtest.core.api import *
from airtest.core.win.win import *
from airtest.aircv.template import *

auto_setup(__file__)
connect_device("Windows:///328782")

touch(Template(r"tpl1628178712650.png", record_pos=(-0.002, 0.541), resolution=(492, 852)))

while(1):
    if exists(Template(r"tpl1628178734543.png", record_pos=(0.004, 0.4), resolution=(492, 852))):
        touch(Template(r"tpl1628178734543.png", record_pos=(0.004, 0.4), resolution=(492, 852)))
    sleep(3)

    if exists(Template(r"tpl1628179046718.png", record_pos=(0.002, 0.683), resolution=(492, 852))):
        touch(Template(r"tpl1628179046718.png", record_pos=(0.002, 0.683), resolution=(492, 852)))
    wait(Template(r"tpl1628178875087.png", record_pos=(-0.002, -0.118), resolution=(492, 852)))
    touch(Template(r"tpl1628178875087.png", record_pos=(-0.002, -0.118), resolution=(492, 852)))
    

# 胜利
# Template(r"tpl1628179616029.png", record_pos=(-0.008, -0.114), resolution=(492, 852))

posted @ 2022-04-05 19:07  我是一言  阅读(122)  评论(0编辑  收藏  举报