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

遇到了问题?请先进行搜索(中文和英文),然后在此提问

Moderators: tmplinshi, arcticir

Hyeku C

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

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"
Guest

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

29 Oct 2023, 10:31

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

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

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默认是活动窗口客户端区域,你用的是屏幕,但未声明。

Return to “请求帮助”

Who is online

Users browsing this forum: No registered users and 115 guests