Jump to content

Getting value from Visible Text


Ram
 Share

Recommended Posts

Hi I am looking for a way to get value from Visible Text. How do I go about doing that? I mean is it possible?

>>>> Window <<<<

Title: Figure 1 - [summary - 1]

Class: Afx:400000:8:10011:0:35207fb

Position: -4, -4

Size: 1288, 808

Style: 0x15CF8000

ExStyle: 0x00000110

>>>> Control <<<<

Class: GXEDIT

Instance: 1

ClassnameNN: GXEDIT1

ID: 52512

Text:

Position: 373, 110

Size: 146, 15

ControlClick Coords: 104, 2

Style: 0x500109C5

ExStyle: 0x00000000

>>>> Visible Text <<<<

Summary - 1

Abstract

20436.00

I woud like to get the value 20436.00 from the visible text. Is this possible if so wht is the command to do it? I tried getting the control info of it but just got the above. The text for the control ID is blank. It would be really great if somebody let me know this.

Awaiting your response!

Thanks!

Link to comment
Share on other sites

  • Moderators

WinGetText() will get the visible window text. You'll need to learn how to use the String* functions to get what you want out of it once you have it.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

This should work.

$Text=ControlGetText("[CLASS:Notepad]","","[CLASSNN:Edit1]")
$Value=StringSplit($Text,@CRLF)
For $i=1 To $Value[0]
    If StringRegExp($Value[$i],"[0-9][^:alpha:]") Then
        MsgBox(0,"",$Value[$i])
    EndIf
Next
Link to comment
Share on other sites

This should work.

$Text=ControlGetText("[CLASS:Notepad]","","[CLASSNN:Edit1]")
$Value=StringSplit($Text,@CRLF)
For $i=1 To $Value[0]
    If StringRegExp($Value[$i],"[0-9][^:alpha:]") Then
        MsgBox(0,"",$Value[$i])
    EndIf
Next
Wow.. This worked.. Thanks a lot Nahuel.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...