def loop_find_assign(query, width, height, origin: tuple, timeout=ST.FIND_TIMEOUT, threshold=None, interval=0.2, intervalfunc=None):
start_time = time.time()
while True:
screen = G.DEVICE.assign_snapshot( width, height, origin, filename=None, quality=ST.SNAPSHOT_QUALITY)
if screen is None:
G.LOGGING.warning("Screen is None, may be locked")
else:
if threshold:
query.threshold = threshold
match_pos = query.match_in(screen)
if match_pos:
try_log_screen(screen)
return match_pos screen 截取到目标区域的图片,灰色有图案,query纯灰色的图query.match_in(screen),match_pos 还是返回了值。