AutoIt Forums: AutoIt and WindowAccessBridge - AutoIt Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

AutoIt and WindowAccessBridge Using AutoIt <-> Java interface

#1 User is offline   MarcoIppo 

  • Newbie
  • Group: Members
  • Posts: 4
  • Joined: 29-July 08
  • Location:Genova (Italy)

Posted 08 August 2008 - 05:00 PM

Hi, someone has used WindowsAccessBridge?

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

My code is:

[ code='text' ]    ( ExpandCollapse - Popup )
$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?

#2 User is offline   PsaltyDS 

  • Most Venerable Penguin
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 11,855
  • Joined: 12-December 05
  • Gender:Male
  • Location:Broke down in Troy crater; AAA won't return my calls...

Posted 08 August 2008 - 07:04 PM

View PostMarcoIppo, on Aug 8 2008, 12:00 PM, said:

Hi, someone has used WindowsAccessBridge?

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

My code is:

[ code='text' ]    ( ExpandCollapse - Popup )
$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?
[ code='text' ]    ( Popup )
; $result=DllCall($dll, "int:cdecl", "isJavaWindow", "int", $hwnd) $result=DllCall($dll, "int:cdecl", "isJavaWindow", "hwnd", $hwnd)


:mellow:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users