Sign in to follow this  
Followers 0
crushyna

Sending specific "Visible Text" from control into handler

2 posts in this topic

#1 ·  Posted

Hello again!

I'm currently working on simple tool that will automate some of our internal application tests - store systems, to be precise ;)
What I'm trying to do, is send value from "Oczekiwana kwota" (that is 1 452,26 PLN in this example) into handler - to use it later on (see picture n.1).
This value could vary depending on current sales, so it must be copied dynamically.
Problem is: AutoIt recognizes only whole window and control (as you can see on the picture).

Although! The desired value can be found under "Visible Text" (see picture n.2).
I've tried to retrieve this data (and edit later on) via ControlGetText command, but it retrieves only first line of text :(

Is there some way I can retrieve specific line of "Visible Text" into handler?
Number of lines is always the same. Only values change.

wartosci.png

window_info.png

Share this post


Link to post
Share on other sites



#2 ·  Posted

Solution found via WinGetText and StringSplit, nevermind ;)

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  
Followers 0

  • Similar Content

    • vvb
      Visible text issues
      By vvb
      Hi All,

      I have an issue where I am trying to automate an installer (installer is setup factory 7). One of the screens does not have any custom visible text except for the three buttons (back, next and cancel).
      I am using WinWait to wait for each screen to appear and using the visible text as an distinguishing feature. Problem is when I store the three button combination as a string, it does not match the visible text. WinGetText returns what looks like the following:

      &Next > &Cancel < &Back
      However, it does not match. And when I do a MsgBox(0, "Test", WinGetText($dlg)) and then use au3info on the messagebox dialog, the visible text is actually:


      &Next >[]&Cancel[]< &Back[]
      where the [] character is actually a rectangle character.

      Question is, is there a way to store the visible text as a constant for later use?

      Cheers,
      Vlad

      Edit:
      Fixed the fist code block. Also, I have done some testing and the [] character is actually chr(10) so I've modified the string constant to be:

      Const $visTextStr = "&Next >" & chr(10) & "&Cancel" & chr(10) & "< &Back" & chr(10)
      I've even done the following test"

      If StringCompare(WinGetText($dlg), $visTextStr) = 0 Then MsgBox(0, "Test", "Same") EndIf
      And the message box pops up saying they are the same, however, winwait still times out waiting for the screen.