Jump to content
Sign in to follow this  

Tesseract UDF Error, automating java applets

Recommended Posts


I am getting the following error while trying to execute a script using Java UDF which in turn uses tesseract udf. the error is related to a function in tesseract UDF. i am not understanding if the handle of the java applet is properly being got or not. Java Udf is developed by user seangriffin. i was running small example. which is

#Include <Array.au3>
#include <IE.au3>
#include <Java.au3>
#Include <GuiComboBox.au3>
#Include <GuiListBox.au3>

$oIE = _IECreate ("http://java.sun.com/applets/jdk/1.4/demo/applets/DrawTest/example1.html")
WinSetState("Draw Test (1.1) - Windows Internet Explorer", "", @SW_MAXIMIZE)
MsgBox(262144, "_JavaObjValuesGet.au3", "Please wait for the webpage and applet ""Draw Test (1.1)"" to finish loading before clicking ""OK""")
_JavaAttachAndWait("Draw Test (1.1) - Windows Internet Explorer")
$java_obj1 = _JavaObjValuesGet("[CLASS:ComboBox; INSTANCE:2]", "", "combo box", 1, 1, @CRLF, 1, 1, 0, 5, 3, 1, 1, 5, 3)
$java_obj1_str = _ArrayToString($java_obj1, @CRLF, 1)
MsgBox(262144, "_JavaObjValuesGet.au3",     "Object values in the Draw Test (1.1) applet include:" & @CRLF & @CRLF & _
                                            "#1 Combo Box = " & $java_obj1_str & "" & @CRLF)


>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "E:\AutoIt examples\javaex1.au3"

C:\Program Files\AutoIt3\Include\Tesseract.au3 (506) : ==> Variable must be of type "Object".:

if $get_last_capture = 1 and $last_capture.item(Number($hwnd)) <> "" Then

if $get_last_capture = 1 and $last_capture^ ERROR

>Exit code: 1 Time: 8.872

Share this post

Link to post
Share on other sites

It may be that the system is defined to disable scripting or that you're running Windows Vista. You can reinstall the script engine by visiting this page or to not use dictionary object and handle the key-value pair using another method like associative array or just a simple 2-dimensional array.

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.