Mohican1989 Posted October 16, 2019 Posted October 16, 2019 Hello everybody! I'm sorry If my english is not perfect. I've been using Autoit to automate a painfull process only using MouseMove / MouseClick / Send and fortunately some Windows were accessible from the Window Info Tool provided, but mostly using mouse coordinates to determinate what and where to click. That is enough if I know I have no conditions to met while doing that type of process, but, if I want to check any condition (eventually based on total row number in a grid, skip row number, decrease row number in my loop as I do an action as the grid will autmatically refresh and decrease rows itself) or even exactly select a menu folder without rely only on the mouse coord which may change from screen to screen and sound pretty unreliable to me. The application that I' am trying to automate is and RDP Desktop App. I read somewhere that there may be problems with RDP application, but I have access to the server which contain the .exe application and tried to get info from there. As you can see in the first pic, I have a Tree List menu on the left side. As I open the tree it span vertically showing vertical bar to reach all the main folder and subfolder underneath (pic 2). Highlighting with Window Info tool this sector I can only retrieve that part and not every single Folder inside (e.g. I cant get "Geografia" button in the Windows info tool). That is what I get in from the Window Info Tool: Quote >>>> Window <<<< Title: Blurred - Blurred 5.0.480 (01) Class: WindowsForms10.Window.8.app.0.13965fa_r14_ad1 Position: -4, -4 Size: 1928, 1044 Style: 0x17CF0000 ExStyle: 0x00050100 Handle: 0x0003016E >>>> Control <<<< Class: WindowsForms10.Window.8.app.0.13965fa_r14_ad1 Instance: 132 ClassnameNN: WindowsForms10.Window.8.app.0.13965fa_r14_ad1132 Name: tlMain Advanced (Class): [NAME:tlMain] ID: 131494 Text: Position: 38, 194 Size: 418, 819 ControlClick Coords: 219, 118 Style: 0x56010000 ExStyle: 0x00000000 Handle: 0x000201A6 >>>> Mouse <<<< Position: 257, 308 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< layoutControl1 >>>> Hidden Text <<<< Frame1 Dominio Al Dal Prat. Cod. Rif. Richiesta Residente Cod. Cli. Cap Al Dal Cod.Rif. Loc. Indirizzo Prov. Naz. Intestato Fine per Stipulato il Numero Frame2 Opzione Tariffaria Numero Concessioni Cattivo Pagatore Tipo Tasso Cat. Merceologica Utilizzo Pagamento C.Fognatura C. Depurazione Interessi di Mora Sosp. Bollettazione Periodicità fatturazione Frame1 Partite Incerte Opz. Tariffaria Tipo Doc Conto Incasso Causale Contabile Intestato Cod. Cli. P.Iva Cod.Fisc. Cod. Con. Cod. Ute. Partite aperte Da Imp. A Imp. Tipo Movimento Crediti Esigibili Cliente Intercompany Tipo Debitore Custom Label Codice Pratica OdL Codice Codice Pratica Ries./Sosp. Cliente Fase Corpo Oggetto Descrizione Pratica Recupero Crediti Stornate Pratica Morosità Reti3 al Codice Pratica Sop a Fase Stato Tipo Pratica 1° Scadenza insoluta dal Ultimo pagamento dal Codice Pratica Mor Stato Ultima fornitura chiusa dal Importo da Esiste Pratica Morosità al Scadenze Dal Saldata Data Riferimento Clienti attivi dal Visualizza Validati Comunicazione Anno Anno di Riferimento Valore Discostamento Custom Label Data Inizio Calcolo Interessi Data Fine Calcolo Interessi Causale Anomalie Deposito e/o Interessi Da Accreditare (solo bollette in lavorazione) Unità Fatturazione In data Cod.Socio Da Data A Data Tipo Stato Tipo Gravità Stato del.155 a da Frame1 Sist.Lettura Matr. Anno Frame1 Classe Alimentato Tipo Lettura Situazione al Misuratori posati al cmbEFA Fase Trasf/Linea a Da anno/num. C.F. P.Iva Soggetto Contabilizzate Data Inizio Bollette Data Fine Bollette Data Limite Scadenza Data Limite Calcolo Interessi Opzione Tariffaria Data Registrazione Data Riferimento Deposito Assegnato a Marca Classificazione Articolo Cod. Articolo Categoria Scadenze dal Codice a al a relative a bollette emesse dal Cliente Relative a clienti che Giorni scaduto da Importo da Cod. Fis. Fase Installatore Accertatore al Dal Trat. Zona Uso Cl. Vo.A. Prestazione Stato Unità Tensione Utilizzo Mercato Descrizione Giro di Misura Fascia Trasformatore Cabina Ordinato Per PDA Check Tec. Mis. Fase Attività Dal al Fatturato Data Denuncia Codice Frame1 Presa Classe Modello Marca Frame1 Stato Certificato N. a Matricola Da Matricola Frame1 Prev. Cons. Ordinato Per Oper. Un. Op. 04180000002086 Mc Cons. Nodi Cod. Rif. Cod. Anno Termico Nom. Punto di Misura Fase Tipo impianto [KW] Anno di riferimento Attività Fase Stato Switch/Attiv. Fase Stato Anno N. fatt. al Dal Tipo Nuova Filtra Max Utilizzabilità POD Codice2 Stato Codice 3 al Dal P.d.P. Fornitore Terminale Operatore Segnalazione Nome Telefono Indirizzo Impianto Un. Op. Tipo al Anomalia Esercizio Codice Oper. Stato Dal Costruttore Gravità Tipo Inizia per Prec Succ Energia Elettrica 1st Question: Based on the info provided above is there any way I could automate to click exactly on a specific tree folder (not subfolder, I guess that this comes after clicking the main folder) ? Actually I could only think to use Mouse Coords to click what I want and use vertical bar shifting to get to last leaf. 2nd Question: I may have not read exactly what "Hidden Text" is really getting from underneath the control / window but as you can check it actually dont find the labels of the folder (e.g. there is no "Acqui Terme" of the pic 3). Filtering from the app there is no thing such as a label called "Opzione Tariffaria" that is in the hidden text list, instead I can find "Opzioni Tariffarie" which is not listed. Is there a way this hidden text can be useful in anyway ? When I click in the subfolder of the pic 4, nothing get initially showed as I need to filter using the "Filtra" button. When I click it a GridView ( I guess) appear showing data (pic 5) I get the following info from Window Into Tool by hovering on the grid (it doesnt get black bordered as the pane in pic3) Quote >>>> Window <<<< Title: Blurred - Blurred rel 5.0.480 (01) Class: WindowsForms10.Window.8.app.0.13965fa_r14_ad1 Position: -4, -4 Size: 1928, 1044 Style: 0x17CF0000 ExStyle: 0x00050100 Handle: 0x0003016E >>>> Control <<<< Class: WindowsForms10.Window.8.app.0.13965fa_r14_ad1 Instance: 134 ClassnameNN: WindowsForms10.Window.8.app.0.13965fa_r14_ad1134 Name: pctGrid Advanced (Class): [NAME:pctGrid] ID: 66170 Text: Position: 459, 229 Size: 1459, 783 ControlClick Coords: 298, 69 Style: 0x56010000 ExStyle: 0x00010000 Handle: 0x0001027A >>>> Mouse <<<< Position: 757, 294 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< layoutControl1 Custom Label Custom Label Nuova Filtra Unità di fatturazione >>>> Hidden Text <<<< Frame1 Dominio Al Dal Prat. Cod. Rif. Richiesta Residente Cod. Cli. Cap Al Dal Cod.Rif. Loc. Indirizzo Prov. Naz. Intestato Fine per Stipulato il Numero Frame2 Opzione Tariffaria Numero Concessioni Cattivo Pagatore Tipo Tasso Cat. Merceologica Utilizzo Pagamento C.Fognatura C. Depurazione Interessi di Mora Sosp. Bollettazione Periodicità fatturazione Frame1 Partite Incerte Opz. Tariffaria Tipo Doc Conto Incasso Causale Contabile Intestato Cod. Cli. P.Iva Cod.Fisc. Cod. Con. Cod. Ute. Partite aperte Da Imp. A Imp. Tipo Movimento Crediti Esigibili Cliente Intercompany Tipo Debitore Codice Pratica OdL Codice Codice Pratica Ries./Sosp. Cliente Fase da a Tot. Corpo Oggetto Descrizione Saldo Partita Pratica Recupero Crediti Stornate Pratica Morosità Reti3 al Codice Pratica Sop a Fase Stato Tipo Pratica 1° Scadenza insoluta dal Ultimo pagamento dal Codice Pratica Mor Stato Ultima fornitura chiusa dal Importo da Esiste Pratica Morosità al Scadenze Dal Saldata Data Riferimento Clienti attivi dal Visualizza Validati Comunicazione Anno Anno di Riferimento Valore Discostamento Data Inizio Calcolo Interessi Data Fine Calcolo Interessi Causale Anomalie Deposito e/o Interessi Da Accreditare (solo bollette in lavorazione) Unità Fatturazione In data Cod.Socio Da Data A Data Tipo Stato Tipo Gravità Stato del.155 a da Frame1 Sist.Lettura Matr. Anno Frame1 Classe Alimentato Tipo Lettura Situazione al Misuratori posati al Fase Trasf/Linea a Da anno/num. C.F. P.Iva Soggetto Contabilizzate Data Inizio Bollette Data Fine Bollette Data Limite Scadenza Data Limite Calcolo Interessi Opzione Tariffaria Data Registrazione Data Riferimento Deposito Assegnato a Marca Classificazione Articolo Cod. Articolo Categoria Scadenze dal Codice a al a relative a bollette emesse dal Cliente Relative a clienti che Giorni scaduto da Importo da Cod. Fis. Fase Installatore Accertatore al Dal Trat. > Zona Uso Cl. Vo.A. Prestazione Stato Unità Tensione Utilizzo Mercato Descrizione Giro di Misura Fascia Trasformatore Cabina Ordinato Per PDA Check Tec. Mis. Fase Attività Dal al Fatturato Data Denuncia Codice Frame1 Presa Classe Modello Marca Frame1 Stato Certificato N. a Matricola Da Matricola Frame1 > Prev. Cons. Ordinato Per Oper. Un. Op. 04180000002086 > Mc Cons. Nodi Cod. Rif. Cod. Anno Termico Nom. Punto di Misura Nc. Ind. Cap Località Fase Tipo impianto [KW] Anno di riferimento Attività Fase Stato Switch/Attiv. Fase Stato Anno N. fatt. al Dal Tipo 1.000 Estrai Max Utilizzabilità POD Codice2 Stato Codice 3 al Dal P.d.P. Fornitore Terminale Operatore Segnalazione Nome Telefono Indirizzo Impianto Un. Op. Tipo al Anomalia Esercizio Codice Oper. Stato Dal Costruttore Gravità Tipo Inizia per Prec Succ Bollettazione\E.E.\Bollette\Lavorazione 3rd Question: Is there any way I can interact with the grid view and get info like, column (2) rows (5/6/7 depending on header) and the text inside the columns like "Verifica" and "1" ? 4th Question: If I know the name of the controls / Windows to use, I can use them from the RDP application or since I cant see them from the Windows Info Tool, AutoIt wont be able to use them ? Can I only work from the server where the .exe is stored in order for it to be succesful ? Thanks in advance and sorry for the wall of text
LarsJ Posted October 17, 2019 Posted October 17, 2019 The built-in automation functions can basically be used to automate the controls in the standard control library. However, they are not sufficient for advanced WindowsForms controls. Here you need UI Automation code. There are three relevant example threads: Framework, UIASpy, Using Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions
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