关于ImageSearch找不到屏幕上的图像

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 关于ImageSearch找不到屏幕上的图像

Re: 关于ImageSearch找不到屏幕上的图像

Post by AutoMT » 31 Oct 2023, 01:59

Code: Select all

CoordMode "Pixel"
    if ImageSearch(&PX, &PY, 0, 0, A_ScreenWidth, A_ScreenHeight, "*130 C:\Users\12940\Desktop\脚本图片\微信截图_20231029222836.jpg")
        Click PX, PY,0
    else 
        msgbox "NO"
改成这样试一下,ImageSearch默认是活动窗口客户端区域,你用的是屏幕,但未声明。

Re: 关于ImageSearch找不到屏幕上的图像

Post by Guest » 29 Oct 2023, 10:31

当我打开图片文件放在屏幕上的时候是可以找到的,可是当我需要在屏幕上找的时候就是找不到。
*n(渐变值) 这个参数我试过也不行要么乱找要么找不到。
图片文件是我直接用微信截的
请问是什么地方的问题?

关于ImageSearch找不到屏幕上的图像

Post by Hyeku C » 29 Oct 2023, 10:16

在我使用ImageSearch的时候无法找到屏幕上出现的图像,这个 *n 参数设置的高了也不行 要么找不到要么乱点。
图片文件是我直接用微信截的

Code: Select all

    if ImageSearch(&PX, &PY, 0, 0, A_ScreenWidth, A_ScreenHeight, "*130 C:\Users\12940\Desktop\脚本图片\微信截图_20231029222836.jpg")
        Click PX, PY,0
    else 
        msgbox "NO"

Top