
KhalidAnsari
Active Members-
Posts
54 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by KhalidAnsari
-
JAVA object automation and simple spy
KhalidAnsari replied to junkew's topic in AutoIt Example Scripts
@junkew Thanks for reply. Following code is closing my Java screen unexpectedly. I am trying to click on "Send button" but $re_ac returning -1 from method _JAB_getAccessibleChildNByRole #include "Javaui.au3" shellexecute("D:\khalid\d\javaapplication2\chatserver\chatserver\MyClient.jar") sleep(5000) global $wintitle = "Login for Chat" $winHandle = WinActivate($wintitle) $result = __isJavaWindow($winHandle) Global $vmId Global $ac __getAccessibleContextFromHWND($winHandle, $vmID, $ac) ConsoleWrite("$vmID : " & $vmID & @CRLF) ConsoleWrite("$ac : " & $ac & @CRLF) Sleep(3000) local $re_ac =_JAB_getAccessibleChildNByRole($vmId, $ac, "push button",1) ConsoleWrite("$re_ac : " & $re_ac & @CRLF) OutPut Java Home: C:\Program Files\Java\jre1.8.0_221 We are using OS X64 at cpu X64; Autoit 64 bit version @AutoItX64=0 C:\Program Files\Java\jre1.8.0_221\bin\WindowsAccessBridge-32.dll PASS: Windows accessbridge WindowsAccessBridge-32.dll opened returns: 1 0 Windows_run returns: $vmID : 1247780 $ac : 1627349361864 Investigating1;1;0;frame; -- Not getting out from _JAB_getAccessibleChildNByRole Investigating0;1;0;; -- Not getting out from _JAB_getAccessibleChildNByRole $re_ac : -1 -
JAVA object automation and simple spy
KhalidAnsari replied to junkew's topic in AutoIt Example Scripts
@junkew I got it working. I just debug it. Checked my dll reference. Now i m tried on my jar file to click on button. I am getting following response in console. shellexecute("D:\khalid\d\javaapplication2\chatserver\chatserver\MyClient.jar") sleep(3000) global $wintitle = "Login for Chat" $winHandle = WinActivate($wintitle) $result = __isJavaWindow($winHandle) Global $vmId Global $ac global $sName = "Send" global $sRole = "push button" __getAccessibleContextFromHWND($winHandle, $vmID, $ac) $re_ac=_JAB_getAccessibleContextByRole($vmId, $ac, $sRole, 1) _JAB_singleAction($vmId, $re_ac) Java Home: C:\Program Files\Java\jre1.8.0_221 We are using OS X64 at cpu X64; Autoit 64 bit version @AutoItX64=0 PASS: Windows accessbridge WindowsAccessBridge-32.dll opened returns: 1 0 Windows_run returns: Name: rect:0000 Name: rect:0000 _JAB_singleAction: Only applicable for single action element like button or check box, menu, menu item -
JAVA object automation and simple spy
KhalidAnsari replied to junkew's topic in AutoIt Example Scripts
@junkew Hi, Sorry to post here as i was following this post. __isJavaWindow($winHandle) is returning 0 (false) for Java Control Panel. Ealier it was giving 1 (true) and I can able to click view button. I am using javaui.au3 file is there any method change. Thanks -
I have refer FAQ 31 and Download accessbridgeexplorer based on that I am getting following out put. Java Home: C:\Program Files\Java\jre1.8.0_221 We are using OS X64 at cpu X64; Autoit 64 bit version @AutoItX64=0 PASS: Windows accessbridge WindowsAccessBridge-32.dll opened returns: 1 0 Windows_run returns: _JAB_singleAction: Only applicable for single action element like button or check box, menu, menu item Code : #include "UIAWrappers.au3" #include "JavaInclude.au3" global $wintitle = "Penjumlahan" $winHandle = WinActivate($wintitle) $result = __isJavaWindow($winHandle) Sleep(5000) Global $vmId Global $ac global $sName = "Add" global $sRole = "push button" __getAccessibleContextFromHWND($winHandle, $vmID, $ac) ;$re_ac = _JAB_getAccessibleContextByFindAll($vmId, $ac, $sName, $sRole) // This line closing Java application. ;_JAB_singleAction($vmId, $re_ac) _JAB_singleAction("push button:Add", "click") Not click on button getting below line. _JAB_singleAction: Only applicable for single action element like button or check box, menu, menu item
-
Hi, I am trying to set value in JTextField and click button in java application. I got JAB working. please refer below. I searched on forum related Java.au3. (_JavaObjValueGet) as well. Apart from setting focus on Java screen. i could not move forward. private JButton btnClose = new JButton("Close"); private JButton btnAdd = new JButton("Add"); private JTextField txtA = new JTextField(); private JTextField txtB = new JTextField(); private JTextField txtC = new JTextField(); ;#RequireAdmin #include "UIAWrappers.au3" #include "Java.au3" AutoItSetOption("MustDeclareVars", 1) ;MsgBox("","Hello","Hello") WinWaitActive("Penjumlahan") Local $oP3=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=Penjumlahan;controltype:=UIA_WindowControlTypeId;class:=SunAwtFrame", $treescope_children) _UIA_Action($oP3,"setfocus") Local $oP2=_UIA_getObjectByFindAll($oP3, "Title:=Penjumlahan;controltype:=UIA_PaneControlTypeId;class:=", $treescope_children) ;MsgBox("","Hello",$oP2) _UIA_Action($oP2,"setfocus")
-
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Thanks for reply Khalid. -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @FrancescoDiMuro Any suggestion will be appreciated Thanks, -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Any help please. Thanks, Khalid -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @FrancescoDiMuro I have search the forum and able to read the pdf and tiff file. I am facing difficulty while read this type of hand written scanned pdf data. Out put result is in txt file. Please review it Result.txt -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi Any suggestions or help Thanks -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @FrancescoDiMuro Thanks for reply. I really appreciate ur effort. Following this I am doing 1. Read the Application Title name. Based on that I will use winWait till that application window load. 2. Then i need to pass data from application. 3. Then i need to open pdf file and again i need to read OCr detail for specific location of pdf . Point 1 and 3 are for OCR. Attaching sample pdf which don't have digital signature. Thanks, Khalid invoice1.pdf -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @FrancescoDiMuro Same out put after changing that line. $TESS_PARAMS= $TIF_FILENAME & " output -l eng" . Below is my tiff image. thanks Khalidtest.tif -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
@FrancescoDiMuro Thanks for quick reply. I m making change then I post my output. Thanks, Khalid -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
@FrancescoDiMuro Attached is my sample file which i am using.OcrScreenCapture.au3 Thanks, Khalid -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi Thanks for quick reply. I am calling it this way Local $TESS_EXE="C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @FrancescoDiMuro Thanks for reply. I can able to find the position through screen capture UDF. Out i am getting in Junk character. Actual text = "Login For Chat" Output = "Ln-gin fur Chat |" Am I missing any character recognition for English? Following are the tessdata file detail Thanks, Khalid -
Tessaract Ocr read Specific location pdf
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @FrancescoDiMuro Thanks for reply. I have converted this .net but i need to read digital signature that is in image format. So i though i should use Tessaract and screen capture. Any other help will be appreciated. Thanks, Khalid -
Could not find Java Application control name
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @junkew Thanks a lot. Its working now. I did following things suggested by you. JabSimpleSpy details below. Mouse position is retrieved 292-198 JAVA window found <> Java Window Title= Handle=0x0000000000030654 res: 1 Result getAccessibleContextFromHWND is <> ubound: 4 We have a VMid 722564 ac 385063152 Call version info: PASSED VMID found : 722564 VMVersion: <1.8.0_191> bridgeJavaClassVersion: <1.8.0_191> bridgeJavaDLLVersion: <1.8.0_191> bridgeWinDLLVersion: <1.8.0_191> *** getAccessibleContextAT result is <385063112> *** getAccessibleContextAT result is <385063112> text text enabled,focusable,visible,showing,focused,opaque,editable,multiple line enabled,focusable,visible,showing,focused,opaque,editable,multiple line 0 0 159 184 220 0 End of getAcceccibleContextAt info -
Could not find Java Application control name
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @junkew Thanks for reply. I will try to do that. -
Could not find Java Application control name
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @junkew $hAccessBridgeDll = DllOpen("C:\Program Files\Java\jre1.8.0_191\bin\WindowsAccessBridge-64.dll") this line return me -1. Is it because of this i am not able to get the info on JabSimpleSpy window. I am just trying to find the cause of it. result return 0, error = 1 What is the exact error i am getting. -
Could not find Java Application control name
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @junkew First line i changed to Y #AutoIt3Wrapper_UseX64=Y Run SciTe as admin user. Still same response. Is this because i am getting @AutoItX64=0 response. ==================== Java Version1.8 JAVAHOME=C:\Program Files\Java\jre1.8.0_191 We are using X64 at cpu X64 Autoit 64 bit version @AutoItX64=0 Opening C:\Program Files\Java\jre1.8.0_191\bin\WindowsAccessBridge-64.dll PASS : Windows accessbridge WindowsAccessBridge-64.dll opened returns: -1 0 1 initializeAccessBridge is finishedWindows_run passed :0 -
Could not find Java Application control name
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @junkew Following thing i have done. I have uninstall java 32 bit version reinstall it with for 64 bit version. Replace my JabSimpleSpy.au3 with latest script you posted. Run autoit SceIT as administrator. Below is my console detail. It is not erroring out but not getting info if i do ctrl+w or mouse move. Java Version 1.8 JAVAHOME=C:\Program Files\Java\jre1.8.0_191 We are using X64 at cpu X64 Autoit 64 bit version @AutoItX64=0 Opening C:\Program Files\Java\jre1.8.0_191\bin\WindowsAccessBridge-64.dll PASS : Windows accessbridge WindowsAccessBridge-64.dll opened returns: -1 0 1 initializeAccessBridge is finishedWindows_run passed :0 >Exit code: 0 Time: 37.09 -
Could not find Java Application control name
KhalidAnsari replied to KhalidAnsari's topic in AutoIt General Help and Support
Hi @junkew I run my scite.exe as administrator but still I am getting error after hello print "AutoIt V3 Script stop executing".