Jump to content
Sign in to follow this  

Sending specific "Visible Text" from control into handler

Recommended Posts


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.



Share this post

Link to post
Share on other sites

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  

  • Similar Content

    • KemyKo
      By KemyKo
      I want to create a program that resizes and changes style/exstyles of other windows. 
      The problem is that i don`t know why my script doesn`t work.
      Here is an example:
      #RequireAdmin #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $setStyle, $getStyle, $outputString='', $getHandle, $setState $getHandle = WinGetHandle("[CLASS:Notepad]") $outputString &= $getHandle & @LF $setState = GUISetState(@SW_SHOWNORMAL, $getHandle) $outputString &= $setState & @LF $getStyle = GUIGetStyle($getHandle) If IsArray($getStyle) = 1 Then $outputString &= $getStyle[0]& ' ' &$getStyle[1]& @LF Else $outputString &= "NOTHING" & @LF EndIf $setStyle = GUISetStyle($WS_POPUPWINDOW, -1, $getHandle) $outputString &= $setStyle & @LF MsgBox(0,"OUTPUT", $outputString) It doesn`t work... At least not for me 
      I noticed that $getHandle is "0x0021023A" and AutoIt Window Info shows : "0x000000000021023A"
      I don`t know if that`s a problem . If it is, idk how to fix it 
    • vvb
      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?


      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.