Jump to content

Recommended Posts

Posted (edited)

Problem Found

 

BmpSearch.au3" (46) : ==> Variable must be of type "Object".:
Local $iRowInc = ($tSizeSource.X - $tSizeFind.X) * 4
Local $iRowInc = ($tSizeSource.X - $tSizeFind^ ERROR

BmpSearch downloaded from

 

Edited by Zag8888
  • 1 month later...
Posted
On 4/18/2019 at 7:53 AM, El-Masry said:

Sorry,the code is not complete ..i didn't revise it 🤒

Also, there is no (Edit) Button 🙄

Here it is :

#NoTrayIcon
#AutoIt3Wrapper_UseX64=NO
#include <imageSearchEX.au3>

Global $imageSearchEX = imageSearchEX
Global $_Check_Image  = _Check_Image

$Your_Window = "";your window
$Your_Control = "";your Control
$Your_Image = "";your Image

While 1
$Coords = $_Check_Image($Your_Window,$Your_Control,$Your_Image)
If $Coords <> 0 Then
    ;Do Something
    ExitLoop
EndIf
Sleep(10000) ;Sleep 10 Seconds
WEnd


Func _Check_Image($Window, $Control, $Image)
$Hwnd = WinGetHandle($Window)
$Control_Pos = ControlGetPos($Hwnd,$Control)
$Coords = $imageSearchEX($Hwnd,$Image)
$Result = $Coords
If $Coords <> 0 Then
    Local $Image_Pos[] = [ $Coords[0] - $Control_Pos[0], $Coords[1] - $Control_Pos[1] ]
    $Result = $Image_Pos
EndIf
Return $Result
EndFunc

 

Hey, having issues with this code, it simply doesn't find the image even if its completely focused and visible .

 

Anyone managed to use it successfully?

In the Window Variable you provided the window title?

thanks.

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
  • Recently Browsing   0 members

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