caramen Posted August 9, 2018 Posted August 9, 2018 (edited) Ok simple question becose I am stuck trying to read the text from a chrome windows. How to record the [Active] chrome windows source code into a text file. To make search into this file after. I tryed a lot of thing actualy this is what i got.... not working #include <MsgBoxConstants.au3> #include <Inet.au3> Example() Func Example() Local Const $sFilePath = "C:\Users\Jordane.guemara\Desktop\AutoIT\test2.txt" ConsoleWrite(_INetGetSource('[active]')) $dData =(_INetGetSource('[active]')) FileWrite($sFilePath, $dData) EndFunc ;==>Example Is there a way to do that fast and easy ? 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
mikell Posted August 9, 2018 Posted August 9, 2018 Help file says : _INetGetSource ("The URL of the site") and '[active]' is NOT a url Suggestion (if you have not got the url yet) : ControlSend F6 to highlight the url in the address bar, then Ctrl+C to copy, then ClipGet to get the url so you can use it in _INetGetSource
caramen Posted August 9, 2018 Author Posted August 9, 2018 I cant do that. Becose the website need a login. So i need to get the source code from my active window. Nothing else 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 10, 2018 Author Posted August 10, 2018 (edited) I confirme i did that, it work perfectly. But does not returning the source from the website where I am logged at. #include <MsgBoxConstants.au3> #include <Inet.au3> HotKeySet("{F2}", "Example") While (1) Sleep (100) WEnd ;~ Example() Func Example() Send ("{F6}") Send ("^c") $oUrl = ClipGet () Local Const $sFilePath = "C:\Users\Jordane.guemara\Desktop\AutoIT\test3.txt" ConsoleWrite(_INetGetSource($oUrl)) $dData =(_INetGetSource($oUrl)) FileWrite($sFilePath, $dData) EndFunc ;==>Example I also got that... work too but bring me to the login screen... so i cant get my desired source code #include <MsgBoxConstants.au3> #include <Inet.au3> HotKeySet("{F2}", "Example") While (1) Sleep (100) WEnd ;~ Example() Func Example() Send ("{F6}") Send ("^c") $oUrl = ClipGet () Local Const $sFilePath = "C:\Users\Jordane.guemara\Desktop\AutoIT\text.txt" ConsoleWrite(_INetGetText($oUrl)) $dData =(_INetGetText($oUrl)) FileWrite($sFilePath, $dData) EndFunc ;==>Example Func _INetGetText($sURL) Local $bStr = InetRead($sURL, 19) If @error Then Return SetError(1, 0, 0) EndIf Local $oHTML = ObjCreate("HTMLFILE") If @error Then Return SetError(2, 0, 0) $oHTML.Open() $oHTML.Write(BinaryToString($bStr)) ; $oHTML.... Return SetError(0, 0, $oHTML.Body.InnerText) EndFunc ;==>_INetGetText Is there an other way to di it ? Edited August 10, 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
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