Jump to content

Recommended Posts

Posted

Hii,

I try read a text from my application. I did used the commands "ControlGetText", "WinGetText" and "GUICtrlRead", but the return is always blank or 0.

I didnt found any example to help me. :

Have a way what i can do this?

Here is my code

WinWaitActive("SAC - Sistema de Atendimento ao Cliente")
Local $sText = ControlGetText("SAC - Sistema de Atendimento ao Cliente","","[CLASS:TspDateTimeCombo; INSTANCE:18]")
MsgBox(0, 'Texto da Tela', $sText)

Here is my application, the black box it's the text i want to read

Posted Image

Here it's the AutoIt Windows Info summary

>>>> Window <<<<

Title: SAC - Sistema de Atendimento ao Cliente

Class: TfsacMenu

Position: -8, -8

Size: 1616, 876

Style: 0x17CF0000

ExStyle: 0x00010100

Handle: 0x001504B6

>>>> Control <<<<

Class: TspCampoMascara

Instance: 54

ClassnameNN: TspCampoMascara54

Name:

Advanced (Class): [CLASS:TspCampoMascara; INSTANCE:54]

ID: 67934

Text:

Position: 400, 353

Size: 288, 20

ControlClick Coords: 130, 10

Style: 0x5C010000

ExStyle: 0x00000200

Handle: 0x0001095E

>>>> Mouse <<<<

Position: 530, 405

Cursor ID: 0

Color: 0xE8E8E8

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

tlCliente

Cadastro de Atendimentos

SLA

/ / : :

/ / : :

/ / : :

/ / : :

/ / : :

/ / : :

08/03/2013 02:51:00 PM

08/03/2013 02:51:00 PM

/ / : :

/ / : :

Contrato

Atendimento cadastrado com versão em Homologação

/ / : :

/ / : :

/ / : :

/ / : :

SLA Interno

/ / : :

SLA esta parada

14/03/2013 06:00:00 PM

Possui SLA

/ / : :

Atend. Priorizado

07/03/2013 11:30:45 AM

SLA possui início automático

bfBarraCadastro

>>>> Hidden Text <<<<

Inicio Auto

sla parado

Ca&dastro

Rateio Padrão

Descrição interna

Descrição da solicitação

Tela Sistema: Tela Selenium

Descrição: Teste Selenium

Possui SLA

14/03/2013 06:00:00 PM

SLA esta parada

Aceito

/ /

07/03/2013 11:30:45 AM

Divulgar na RAV

14/03/2013 06:00:00 PM

/ /

Encerr&amento

Destaque

14/03/2013 06:00:00 PM

ok

Notificar o cliente por e-mail

08/03/2013 02:50:57 PM

Histórico do Atend.

Padrão

Orçamento / Requisitos

Alterar Faturamento

/ / : :

/ /

07/03/2013 11:30:45 AM

Salts Vinculadas

&Versão

C&onsulta

spButton1

Posted

Thanks for the help, but this code return the blank.

It found the handle, but it dont read the text.

Other way.

I managed read the field in the black box in the image

I don't understand the difference. Because is the only field what that i can read the text in the application. (it's a checkbox).

i can read this field with the commands "ControlGetText", "WinGetText" and "GUICtrlRead".

Posted Image

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...