Jump to content

_ImageSearch error.


Recommended Posts

Hi,

I am using the command above on my desktop searching for an image given in the code and it works like a charm.

My question is why the the command doesnt work on programms or Clients?

I am using _ImageSearch on a Client and it fails to find the picture. I tried taking big and small pictures, saving them as .bmp and searching them but the command fails to find them. Any ideas why?

I have to say that it works perfectly on my desktop though.

Regards

I feel nothing.It feels great.

Link to comment
Share on other sites

Its an IRC client which i have created and just wanted to make my life easier.

My problem is that i cannot make it work on Clients or other windows.

I was searching and also found the _ImageSearchArea commands but again didnt had any luck. I can say that i didnt completly understand the params of this command.

Here is some piece of code:

#include <ImageSearch.au3>
HotKeySet("s", "_Start")
HotKeySet("x", "_Exit")
$X = 0
$Y = 0
Func _Start()
$result = _ImageSearch("help.bmp",0,$X,$Y,0)
if $result=1 Then
    MouseMove($X,$Y,3)
    MsgBox(0,"Found","Image is here")
EndIf
$results = _ImageSearchArea("help.bmp",0,0,0,16,21,$X,$Y,0)
if $results = 1 Then
    MouseMove($X,$Y,3)
    MsgBox(0,"Found","Image is here")
Else
 MsgBox(0,"Error", "Image not found.")
EndIf
EndFunc
Func _Exit()
 Exit
EndFunc

While 1
WEnd

I feel nothing.It feels great.

Link to comment
Share on other sites

Look guys. My problem is not a specific application that i am trying to search. As i already said it is not working on clients and applications. It is working on my desktop though. This part is weird. I figured that it is not working on some applications on windowed fullscreen(or not) because when i run the script, it searchs my desktop even that a applications is poped up. Any ideas why???

Should i get handle of the window first then _ImageSearch on it? Is it possible?

I feel nothing.It feels great.

Link to comment
Share on other sites

If we knew what type of client you r running that isn't getting searched, we might be able to help. I know for a fact that the imagesearch function works on a full screened firefox. Actually I can't think of anything that the imagesearch doesn't search so I'm interested in what you r running that doesn't work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...