Jump to content

AutoIt and WindowAccessBridge


Recommended Posts

Hi, someone has used WindowsAccessBridge?

I try to use isJavaWindow in dllCall but it doesn't work.

My code is:

$dll = DllOpen("windowsaccessbridge.dll")
if $dll <> -1 Then
    $prev_titMatchMode=AutoItSetOption ( "WinTitleMatchMode", 2)
    WinWait("Software Download")
    $hwnd = WinGetHandle("Software Download")
    if NOT WinActive($hwnd) Then
        WinActivate($hwnd)
    EndIf

    msgbox(32, "Information Window [1]", "Pausa")
    
    $result=DllCall($dll, "int:cdecl", "isJavaWindow", "int", $hwnd)
    $error=@error
    if $error==0 Then
        if($result[0] == True) Then
            $message="Windows Selected ID: " & @TAB & $hwnd & @CRLF
            $result = DllCall($dll, "int:cdecl", "getAccessibleContextFromHWND", "int", $hwnd, "ptr", -1, "ptr", -1)
            $error=@error
            If Not $error Then
                $message = $message & "Esito Call Dll: " & @TAB & @TAB & $result[0] & @CRLF
                $message = $message & "HWND Target: "  & @TAB & @TAB & $result[1] & @CRLF
                $message = $message & "Long *vmID: "  & @TAB & @TAB & $result[2] & @CRLF
                $message = $message & "AccessibleContext *ac: "  & @TAB & $result[3]
                msgbox(32, "Information Window [1]", $message)
            Else
                MsgBox(64, "Alert Windows", "Errore nell'accesso Dll: " & $error)
            EndIf
        Else
            MsgBox(64, "Alert Windows", "Non e` stata riconosciuta come finestra Java: " & $result[0] & ", " & $result[1])
        EndIf
    Else
        MsgBox(64, "Alert Windows", "Problemi nella chiamata Dll: " & $error)
    EndIf

There is something wrong?

Link to comment
Share on other sites

Hi, someone has used WindowsAccessBridge?

I try to use isJavaWindow in dllCall but it doesn't work.

My code is:

$dll = DllOpen("windowsaccessbridge.dll")
if $dll <> -1 Then
    $prev_titMatchMode=AutoItSetOption ( "WinTitleMatchMode", 2)
    WinWait("Software Download")
    $hwnd = WinGetHandle("Software Download")
    if NOT WinActive($hwnd) Then
        WinActivate($hwnd)
    EndIf

    msgbox(32, "Information Window [1]", "Pausa")
    
    $result=DllCall($dll, "int:cdecl", "isJavaWindow", "int", $hwnd)
    $error=@error
    if $error==0 Then
        if($result[0] == True) Then
            $message="Windows Selected ID: " & @TAB & $hwnd & @CRLF
            $result = DllCall($dll, "int:cdecl", "getAccessibleContextFromHWND", "int", $hwnd, "ptr", -1, "ptr", -1)
            $error=@error
            If Not $error Then
                $message = $message & "Esito Call Dll: " & @TAB & @TAB & $result[0] & @CRLF
                $message = $message & "HWND Target: "  & @TAB & @TAB & $result[1] & @CRLF
                $message = $message & "Long *vmID: "  & @TAB & @TAB & $result[2] & @CRLF
                $message = $message & "AccessibleContext *ac: "  & @TAB & $result[3]
                msgbox(32, "Information Window [1]", $message)
            Else
                MsgBox(64, "Alert Windows", "Errore nell'accesso Dll: " & $error)
            EndIf
        Else
            MsgBox(64, "Alert Windows", "Non e` stata riconosciuta come finestra Java: " & $result[0] & ", " & $result[1])
        EndIf
    Else
        MsgBox(64, "Alert Windows", "Problemi nella chiamata Dll: " & $error)
    EndIf

There is something wrong?

Shouldn't the HWND parameter be tagged that way?
; $result=DllCall($dll, "int:cdecl", "isJavaWindow", "int", $hwnd)
$result=DllCall($dll, "int:cdecl", "isJavaWindow", "hwnd", $hwnd)

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...