caramen Posted August 8, 2018 Posted August 8, 2018 (edited) 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 August 8, 2018 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 - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
FrancescoDiMuro Posted August 8, 2018 Posted August 8, 2018 Hi @caramen What about _IEDocReadHTML() or _IEBodyReadHTML() ? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
caramen Posted August 8, 2018 Author Posted August 8, 2018 (edited) @FrancescoDiMuroUnfortunatly, it s on chrome . I watched chrome UDF and there is nothing about text reading... Edited August 8, 2018 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 - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
caramen Posted August 8, 2018 Author Posted August 8, 2018 Or the question in more easy way 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 - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
AutoBert Posted August 8, 2018 Posted August 8, 2018 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. caramen 1
caramen Posted August 8, 2018 Author Posted August 8, 2018 @AutoBert Plz dont laugth 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 - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
caramen Posted August 8, 2018 Author Posted August 8, 2018 #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 - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
junkew Posted August 9, 2018 Posted August 9, 2018 Try faq 31 caramen 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
AutoBert Posted August 9, 2018 Posted August 9, 2018 20 hours ago, caramen said: @AutoBert Plz dont laugth I am trying these things : I don't, as mentionened in a other thread: chrome isn't my browser and so i don't know the correct syntax.
caramen Posted August 9, 2018 Author Posted August 9, 2018 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 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 - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
FrancescoDiMuro Posted August 9, 2018 Posted August 9, 2018 @caramen If you are trying to automate Chrome, you should see the source code in the webpage, not use Spy++... Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
caramen Posted August 9, 2018 Author Posted August 9, 2018 (edited) @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 August 9, 2018 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 - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
caramen Posted August 9, 2018 Author Posted August 9, 2018 (edited) 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 August 9, 2018 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 - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
junkew Posted August 10, 2018 Posted August 10, 2018 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. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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