Jump to content

How to read the text of an active chrome windows?


Recommended Posts

Hey. :) 

 

I requested help about how to get a value from a text in a variable. 

Now i know how to do that. But i learned with the command FileRead. Now i whould like to know how to replace the command :

FileRead('Dossier.txt')

The purpose is to read a webpage text. To find some value inside. 

 

Btw i tryed to play with WindowsInfo.au3 but i dont got much thing.  

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

@FrancescoDiMuroUnfortunatly, it s on chrome :P . I watched chrome UDF and there is nothing about text reading... :( 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

Or the question in more easy way :D 

 

How to read the text of an active chrome windows?

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

Can't believe that none of these functions: 

_ChromeObjGetHTMLById($objid, $timeout = 5)

_ChromeObjGetHTMLByName($objname, $index = 0, $timeout = 5)

_ChromeObjGetHTMLByTagName($tagname, $index = 0, $timeout = 5)

can do a part of the job for you. But you have to investigate time to learn about HTML, regex and/or string functions.  

If chrome.au3 isn't possible, try download site with HTTP or  with InetGet.

Link to comment
Share on other sites

@AutoBert Plz dont laugth :P I am trying these things : 

#include <Array.au3>
#include <String.au3>
#include <IE.au3>
#include "C:\Users\Jordane.guemara\Desktop\AutoIT\Chrome.au3"

Global $objid = "[class:Chrome_renderWidgetHostHWND; INSTANCE:1]"
Global $test = _ChromeObjGetHTMLById($objid, 1 )

Msgbox(0,"", $test )

Return value = "" 

 

:( Is my syntaxt correct ? 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

#include <Array.au3>
#include <String.au3>
#include <IE.au3>
#include "C:\Users\Jordane.guemara\Desktop\AutoIT\Chrome.au3"
#include <MsgBoxConstants.au3>

Opt("WinTitleMatchMode", 2)

Global $sText = WinGetText("Anah")

MsgBox($MB_SYSTEMMODAL, "", $sText)

Well this is working... But the return value is:

Chrome Legacy Windows

Help plz ! :'( 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

I am sorry guys... i will probably looks stupid... 

 

When i follow Chrome UDF steps i cant get the google extention working. So i think this breack the followings steps. 

When i follow FAQ 31 i am going on chrome UDF topic. Stuck again... 

 

When i try simple spy i dont know where to start. I got too much value. Too much controls and without help i dont know what to do with all that... Even if i am familiar with autoit. I am 100% stuck.

 

Does one of you got any exemple script of Google automation where i can read and learn everything... becose this is an important script I got 14 days left before not being able to complet the task. 

 

I dont ask from anyone of you to make the code for me. Just an orientation. A kick in my face or somthing :D 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

@FrancescoDiMuro Can you explain this reply ? Ok i watch the source code but what do i use with it ? Chrome UDF ? 

BTW i am looking for some exemple code but, I just found nothing... I only found peoples stuck like me. with all the same reply... Chrome udf that is not working... becose of the extention.

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

For exemple i located the source code that is interesting me : 

 

<table cellpadding="0" cellspacing="0" border="0" width="100%" class="dialog_line  dialog_memo_size"><tbody><tr><td><div aria-labelledby="label_SD_REQUEST_COMMENT" tabindex="0" id="SD_REQUEST_COMMENT1" name="SD_REQUEST_COMMENT1" class="dialog_memo"><p><b>[ANAH][42][Instructeur][21349_1521108952] Modification ROD   </b></p><br><br><br><br><p></p><p>Bonjour,</p><p>Pascale BERNARD vous envoie ce message :</p><p>Bonjour, Je réitère mon message du 16/07/2018 par mail : nous avons reçu la demande de subvention dématérialisée de Mme MIREILLE habitant Ville. lorsque l'on clique sur "créer le dossier dans OPAL", un message d'erreur apparaît indiquant que le code postal ne correspond pas à la commune alors que celui-ci est bien correct. merci de bien vouloir remédier à ce problème qui empeche l'enregistrement du dossier. bien cordialement</p><p>Coordonnées :<br>- email : @loire.gouv.fr<br>- tél. : </p> <br><img src="h4u8.mjt.lu/oo/AM4AABKSTu0AAAAAAAAAAGnAstAAASKBFzEAAAAAAAf4sQBbbCPoG4Yw2uOXQmWMxPwz8-jRuwAHlfY/4cfbd339/e.gif" height="1" width="1" alt="" border="0" style="height:1px;width:1px;border:0;"> <p></p></div></td></tr></tbody></table>

Inside this code this line interesting me : 

[ANAH][42][Instructeur][21349_1521108952] Modification ROD

How to get this line into a variable ?

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

See the thread on iuiautomation and there are examples for chrome firefox ie opera all in a similar way.

Getting to html in a generic way can be done by typing in addressbar of your browser

Javascript:alert(document.body.innerhtml);return void(0);

Please check above on casesensitivity.

I am not sure if chrome udf is still maintained for latest versions of chrone.

 

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

×
×
  • Create New...