Problem with imagesearch

03/12/2015 23:27 kwejk#1
Hello i found this
Code:
#include <ImageSearch.au3>

Global $x, $y

$prison = _ImageSearch("check.bmp",1,$x,$y,50)
If $prison = 1 then
  MouseClick("right", $x, $y)
Else
   MsgBox(048,"Attention","I didnt found the picture.")
EndIf
And when i run it aplication don't show error so it found picture but don't press on image.
03/14/2015 13:33 Logtetsch#2
Your if statement is wrong. Use the comparison operators instead of assignment operators!
[Only registered and activated users can see links. Click Here To Register...]

Code:
If $prison == 1 Then
03/14/2015 16:45 alpines#3
Actually it is not. Using $integerValue = 1 and $integerValue == 1 does the same in AutoIt.

He could've used something like this too
Code:
If _ImageSearch("check.bmp",1,$x,$y,50) Then MouseClick("right", $x, $y)
03/14/2015 19:54 Logtetsch#4
Well, I remember why I stopped using AutoIT...
B2t: Is it true, that the image is displayed on a seperate window?
03/14/2015 22:40 alpines#5
Can you tell me more about AutoIT because I've only been using AutoIt for years.