Yash91

M not able to read text form autoit finder which is at the bottom of the screen.

4 posts in this topic

#1 ·  Posted

Dear Team,

I am working on windows based application in which i have to read the error msg which is coming on the bottom of the the windows application screen.its a kind of status bar msg but not status bar because when i find it using AutoIT finder the complete panel of the screen is getting selected.
 
PFA and request you to give your inputs on it.
 
OS: Windows XP
Java: 1.7
AutoIT: 3.1.3
 
I tried jubula and sikuli and java OCR also but unable to get text of that panel. 

IMG_20170405_155503768.jpg

Share this post


Link to post
Share on other sites



#2 ·  Posted

So you are trying to access details on an application within a TightVNC session? Probably not going to work...

Share this post


Link to post
Share on other sites

#3 ·  Posted

You'd have to run the autoit application on the computer you're connecting to to read the status bar.

Another option is to create screenshots of each of the available errors and use imagesearch to see if any of them are shown. This may or may not work depending on the colors from the vnc client. At a lower connection speed vnc, well any remote connection, will lower the bitrate of the screen (so colors may get dulled or not look as pretty), which can affect ImageSearch. Always worth a shot though. (Note, this is not OCRing the error. This is creating a small image of each of the error messages and just searching for that image on the screen. Doesn't matter what the text really is, if it finds the image you can know what the error actually is)

1 person likes this

Share this post


Link to post
Share on other sites

#4 ·  Posted

@Danp2 i tried to run the same code on the execution computer also without VNC access, but getting the same result.

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

  • Similar Content

    • robcull
      By robcull
      Hello all! I have had some issues reading text from different types of windows, occasionally, specifically with controlgettext. 
      **Before I begin, I know there are better ways to do what I attempt in the example below. That's not the point of this post. The point is my issues with controlgettext. 
      I am about to cite an example with an application you may be familiar with called SpeedFan (v4.52). My problem is not specific to speedfan, it is simply the most recent and easily reproducible example I can think of. 
      So, the goal of the script below is to get a string of text containing the current fan RPMs from the highlighted control in the screenshot below (see "speedfan_control_details.png").

      Now, here's a simple script for grabbing the window handle and reading the text from that control: 
      $wintitle = "SpeedFan 4.52" $controlID = "197934" ;will be reformatted as "[ID:######]" $hwnd = wingethandle($wintitle) if @error<>0 then msgbox(0, "WinGetHandle", "FAILURE. @error="&@error) Exit EndIf $text = ControlGetText($hwnd, "", "[ID:"&$controlID&"]") if @error=1 then msgbox(0, "ControlGetText", "FAILURE. @error="&@error) ;failure returns "" and @error=1 Exit EndIf msgbox (0, "ControlGetText", "SUCCESS. @error="&@error &@CRLF& "$text="&$text) ;success returns string and @error=0 You'll see that the ControlGetText operation runs without error, however it does not capture any text from the control. If you explore the other controls in this one window, you'll find mixed results across the board. Neither the temps nor voltages can be read, while the log field and some other elements can be read. Even when you read the text from the whole window, those elements are not included in the visible nor hidden texts. 
       
      I have run into this issue many times in the past- inconsistencies in the ability of autoit to interact with certain controls. What is it which makes this text different than any other readable texts? Is there an alternate method of reading the text in the window/control which could work? Any and all info to help me solve this mystery and satisfy my curiosity would be greatly appreciated. 
      Thanks  -Rob C
      PS: Running Autoit v3.3.14.2 on Win7 Ultimate x64
    • automaterk
      By automaterk
      Hello again all!
      Everyone has been a great help with my work so far, but I have come across something that hopefully has a simple solution.
      I have a window that the Info tool can grab all control info from and easily identify the text of said controls. The window in question is below.

      The text I am trying to grab are the acct, history and chart numbers. The output of the info tool is as follow:
      >>>> Window <<<< Title: Admission/Registration Confirmation Screen Class: LSPANEL Position: 587, 307 Size: 764, 461 Style: 0x94C40000 ExStyle: 0x00000100 Handle: 0x00000000000E1134 >>>> Control <<<< Class: LSSTATIC Instance: 29 ClassnameNN: LSSTATIC29 Name: Advanced (Class): [CLASS:LSSTATIC; INSTANCE:29] ID: 5 Text: 2000684 Position: 224, 39 Size: 60, 14 ControlClick Coords: 30, 7 Style: 0x5400008C ExStyle: 0x00000004 Handle: 0x00000000000E1140 I have tried several variations of of things to get AutoIT to interact with the window. This was my latest
      ControlFocus("Admission/Registration Confirmation Screen", "", "#327701") ;ControlClick("Admission/Registration Confirmation Screen", "", "LSBMPBUT4") ;Local $sText = ControlGetText("Admission/Registration Confirmation Screen","", "[CLASS:LSSTATIC; INSTANCE:29]") ;Local $sText1 = WinGetTitle("Admission/Registration Confirmation Screen", "") ;MsgBox($MB_SYSTEMMODAL, "", "The text in LSSTATIC29 is: " & $sText) ;MsgBox($MB_SYSTEMMODAL, "", "The text in LSSTATIC29 is: " & $sText1) I've also tried just having LSSTATIC29, etc.
      After messing with everything for awhile, it seems AutoIt simply has issues working with this window at all as I can't get it to ControlClick the button either. All other windows of this nature have been completely usable. I noticed that with this particular window ,while I can identify the controls, when I click and hold - it allows me to drag a box across the window. Not sure if this matters or not, but thought it might be important for identifying the type of window.
      I can't think of anything else I might be leaving out, but if there are any questions please let me know and I will get back to you as soon as I can. I will be working on the rest of this project on and off for the weekend. Thank you in advance for any help you might be able to give!
    • shai
      By shai
      i try get text from Quinnect application:
      see details here:
      http://www.remoteutilities.com/support/kb/50/
      and the download is here:
      http://www.remoteutilities.com/download/QAgent.exe
      here is my code:

      WinActivate ('Quinnect',"") WinWaitActive ('Quinnect',"") $hHandle = WinGetHandle('Quinnect') $var = ControlGetText($hHandle, '', '[CLASS:TPanel; INSTANCE:5]') ConsoleWrite($var & @CRLF)
      but i get in Console "pnState".
      i want get the "Ready for connection" text.

      thanks for any your help