athilann Posted April 3, 2013 Posted April 3, 2013 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 codeWinWaitActive("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 readHere it's the AutoIt Windows Info summary>>>> Window <<<<Title: SAC - Sistema de Atendimento ao ClienteClass: TfsacMenuPosition: -8, -8Size: 1616, 876Style: 0x17CF0000ExStyle: 0x00010100Handle: 0x001504B6>>>> Control <<<<Class: TspCampoMascaraInstance: 54ClassnameNN: TspCampoMascara54Name: Advanced (Class): [CLASS:TspCampoMascara; INSTANCE:54]ID: 67934Text: Position: 400, 353Size: 288, 20ControlClick Coords: 130, 10Style: 0x5C010000ExStyle: 0x00000200Handle: 0x0001095E>>>> Mouse <<<<Position: 530, 405Cursor ID: 0Color: 0xE8E8E8>>>> StatusBar <<<<>>>> ToolsBar <<<<>>>> Visible Text <<<<tlClienteCadastro de AtendimentosSLA / / : : / / : : / / : : / / : : / / : : / / : : 08/03/2013 02:51:00 PM08/03/2013 02:51:00 PM / / : : / / : : ContratoAtendimento cadastrado com versão em Homologação / / : : / / : : / / : : / / : : SLA Interno / / : : SLA esta parada14/03/2013 06:00:00 PMPossui SLA / / : : Atend. Priorizado07/03/2013 11:30:45 AMSLA possui início automáticobfBarraCadastro>>>> Hidden Text <<<<Inicio Autosla paradoCa&dastroRateio PadrãoDescrição internaDescrição da solicitaçãoTela Sistema: Tela SeleniumDescrição: Teste SeleniumPossui SLA14/03/2013 06:00:00 PMSLA esta paradaAceito / / 07/03/2013 11:30:45 AMDivulgar na RAV14/03/2013 06:00:00 PM / / Encerr&amentoDestaque14/03/2013 06:00:00 PMokNotificar o cliente por e-mail08/03/2013 02:50:57 PMHistórico do Atend.PadrãoOrçamento / RequisitosAlterar Faturamento / / : : / / 07/03/2013 11:30:45 AMSalts Vinculadas&VersãoC&onsultaspButton1
FireFox Posted April 3, 2013 Posted April 3, 2013 Hi, Welcome to the autoit forum Try this: #include <GUIComboBox.au3> Local Const $hCombo = ControlGetHandle("SAC - Sistema de Atendimento ao Cliente", "", "[CLASS:TspDateTimeCombo; INSTANCE:18]") If $hCombo = 0 Then Exit(1) ConsoleWrite(_GUICtrlComboBox_GetEditText($hCombo) & @CrLf) Br, FireFox.
athilann Posted April 3, 2013 Author Posted April 3, 2013 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 imageI 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".
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now