Jump to content

Recommended Posts

Posted

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!

  • Moderators
Posted

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.

Posted

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
Posted

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.

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
  • Recently Browsing   0 members

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