Jump to content

kingkaj

Members
  • Posts

    7
  • Joined

  • Last visited

kingkaj's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I tried the Java Ferret and Monkey apps that are included with Access Bridge on jar as well as compiled Java apps and it works on both.
  2. Your code gives me the same results as my original code. Tried with hwnd* as well, no change in output.
  3. Thanks for your reply PsaltyDS. In fact my 2 line script returns exactly the same as the example you posted. So I can get as far as DllCall not returning an error. Let me explain some more... What I'm trying to do is read the text off a Java screen. I'm using Java Access Bridge 2.0.1 with JDK 1.5.0_12. JDK comes with a demo app swingset. I'm trying to read the strings from the warning dialog example: First I need the AccessibleContext and vmID. Access Bridge API doc say to use GetAccessibleContextFromHWND. My script then becomes: $dll = DllOpen ("WindowsAccessBridge.dll") $hWindow = WinGetHandle("[Class:SunAwtDialog]") WinWaitActive ("[CLASS:SunAwtDialog]", "") $result=DllCall($dll, "int:cdecl", "getAccessibleContextFromHWND", "HWND", $hWindow) ConsoleWrite (@error &';'&$result[0]&';'&$result[1]) Note the spelling of the function, it fails when you put 'GetAccessibleContextFromHWND'. My script writes following to the console 0;0;0x000F016E, which tells me the call to the dll went fine (@error = 0), but the rest just returns what I submitted as parameters. I expected to get the AccessibleContext and vmID.
  4. I've yet to see someone posting about successful interaction between AutoIt and Java Access Bridge, see this thread here. Is there someone who has some working experience in doing this? Help is greatly appreciated. Thanks, Kaj
  5. I'm also trying to use WindowsAccessBridgel.dll. Could be wrong here, but perhaps there's no need to call initializeAccessBridge(). Anyway, no matter what I do it always return an error. I've been calling the function isJavaWindow like here: $result=DllCall("WindowsAccessBridge.dll", "int:cdecl", "isJavaWindow", "HWnd", "0x0048010E") ConsoleWrite (@error &';'&$result[0]&';'&$result[1]) and it seems to be successful: @error gives me a 0, and I get the hwnd value back in the $result. I was expecting true or false though... Am I doing the right thing here?
  6. Thanks for the reply. However in your response one compiled script is a child of another other script. I was looking for a way to have independent scripts sends messages to each other's 'stdin' by calling their PID. Cheers.
  7. Having played with StdinWrite and StdoutRead, I understand these can only read an write into a child process. What if I wanted to read or write to the handle (ProcessID) of an executable invoked by independeant scripts? Scenario: -Script A starts an SSH session by calling plink -Script B gets the PID from A, and reads and writes to the plink handle -A and B are totally independent scripts Dont think this is possible, but who knows someone has a clever trick to pull this off. Cheers.
×
×
  • Create New...