Jump to content

Imagesearch() looks for desktop, not actived window


Recommended Posts

Hi all guys,

I was asked to develop a tool to manage a .NET application in our office (medical equipment).

I need to store informations as soon as windows appear.

I used the following:

            $PId = RunWait(@comspec & " /c " & chr(34) & $s_appfolder & "\" & $s_appname & chr(34))

;           WinMove($s_app_label, "", 0, 0)

            Local $t = 0

            While $t = 0

                If _ImageSearcharea($imagesearchfolder2 & "\query.bmp", 1, 0, 0, @DesktopWidth, @DesktopHeight, $x, $y, 100) = 1 Then

                    WinMove($s_app_label, "", 0, 0)

                    $t = 1

                EndIf

            WEnd ;                                
            _status(0, "Compiling Datas")

But this time it doesn't work and for sure query.bmp is the correct file i need to search for.

To understand better I tried the following:

if Not WinActive($s_app_label) Then

    WinActivate($s_app_label)

    WinMove($s_app_label,"",0,0)

EndIf
_ScreenCapture_Capture("query.bmp",0,0, 500,500,0)

and... result is a query.bmp that doesn't capture the .Net program but the desktop.

It seems both imagesearch() and _screencapture() don't recognize the program window but go back to desktop (seems a transparent window but window is not transparent).

In the past I used, for other projects,

#AutoIt3Wrapper_UseX64=n

I'm under W7X64.

 

Any clue on how to solve that?

Thanks erveryone?

Marko

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

×
×
  • Create New...