raviaccenture Posted August 7, 2013 Posted August 7, 2013 I am trying to automate basic functionality on freeOCR. I am using below code to select a menu item: WinMenuSelectItem ( "FreeOCR", "", "File", "Open") It is not working. Simillarly I am using below code to get text from an edit box. $value = ControlGetText ( "FreeOCR", "", "[CLASS:Edit; INSTANCE:1]") Could any one please assist. Regards, Ravi 9490422779
FireFox Posted August 7, 2013 Posted August 7, 2013 (edited) Hi,Try this:Local $hWnd = WinGetHandle("FreeOCR") ConsoleWrite(ControlGetText($hWnd, "", "[NAME:TextBox1]") & @CrLf) ;Note: The window's menu is customized and can not be manipulated otherwise than Mouse* functions. WinActivate($hWnd) WinWaitActive($hWnd) Local $aWndPos = WinGetPos($hWnd) MouseClick("left", $aWndPos[0] + 30, $aWndPos[1] + 40, 1, 0) MouseClick("left", $aWndPos[0] + 30, $aWndPos[1] + 60, 1, 0) Local $sFilePath = "image.bmp" ControlSetText("Select Image to OCR", "", "[CLASS:Edit; INSTANCE:1]", $sFilePath, 1) ControlClick("Select Image to OCR", "", "[CLASS:Button; INSTANCE:1]")Edit: Welcome to the autoit forum Br, FireFox. Edited August 7, 2013 by FireFox
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now