Sunday, March 27, 2011

Interacting With Java Applet

Does anyone know if it is possible to interact with a java applet via .net?

Edit: I was able to use the UI Automation framework to locate the java applet, and from there use OCR to read data and simulate mouse/keyboard input into the applet.

From stackoverflow
  • Please describe what you mean by "interact". What is the problem that has led you to the proposed solution; i.e., "interacting with a Java applet via .NET"? There may well be a much better path to take...

    Eddie : This should really be a comment to the original question, not an answer to it.
    yawmark : My bad - I'll remember that protocol going forward. Thanks!
  • I need to access data from a website that launches a java applet. I'll need to go through a number of "screens" in the applet in order to get to the data I'll need.

    Zach Scrivena : Please add this information to your original question (click "edit"). Post a new answer only if it answers your original question.
  • Assuming the data isn't generated within the applet itself (i.e., on the client), does the applet talk to the server using a proprietary protocol or does it communicate via HTTP or some other common network protocol? What kind of data is this?

  • It communicates via a custom protocol, so I'm assuming that I'll need to caputer my data via OCR. What I'm trying to figure out is the best way to interact with the applet. I can't just do a type of macro since what I do and enter needs to change based on the data on each screen that I go through.

  • You may well be able to do it using accessibility APIs, which are designed to let screen-readers and so on interact with programs. Have a look at:

    http://en.wikipedia.org/wiki/Microsoft_UI_Automation

    BDekker : The UI automation framework appears unable to see inside the java applet.

0 comments:

Post a Comment