Israelks Posted April 8, 2018 Share Posted April 8, 2018 Hi, I'm trying to read informations from a .txt stored file (i'm using drive to store the file, but i accept suggestions), I dont wanna use _IE because it is VERY slow for me, i've tried using InetRead and WinHTTP without success, here is my attempts: $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "https://drive.google.com/open?id=1Cmk5-Mr10CwDcie37sb4AmhHj6D8S9C5", False) $oHTTP.Send() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status ConsoleWrite($oReceived) ConsoleWrite(BinaryToString(InetRead("https://drive.google.com/open?id=1Cmk5-Mr10CwDcie37sb4AmhHj6D8S9C5",1))) $oIE = _IECreate("https://drive.google.com/open?id=1Cmk5-Mr10CwDcie37sb4AmhHj6D8S9C5") ConsoleWrite(_IEDocReadHTML($oIE)) <<<<< WORKING, BUT VERY SLOW Thanks! Link to comment Share on other sites More sharing options...
xCROv Posted April 8, 2018 Share Posted April 8, 2018 (edited) Try _INetGetSource(). You will need to parse the info on your own though. If you're just looking to host a txt file then you can probably find a better way to do it that isn't google docs and will require less https://www.autoitscript.com/autoit3/docs/libfunctions/_INetGetSource.htm Edited December 1, 2020 by xCROv Link to comment Share on other sites More sharing options...
Israelks Posted April 8, 2018 Author Share Posted April 8, 2018 Hi, thank you for your answer, Using INetGetSource i could not get the information stored (TEST123456), the results are the same as using InetRead and WinHTTP Link to comment Share on other sites More sharing options...
xCROv Posted April 8, 2018 Share Posted April 8, 2018 It's because it's being hosted on Google Docs. Like I was saying, you will prob need to find a new method of storing the text online if you're wanting to do this without having to spend a lot more effort on parsing and getting the data. #include <Inet.au3> ConsoleWrite(_INetGetSource('http://xcrov.com/autoit/test.txt')) Link to comment Share on other sites More sharing options...
Israelks Posted April 8, 2018 Author Share Posted April 8, 2018 i've searched an alternative for drive but i could not find, can you suggest me a place to host a text file? (where i can edit the text and still with the same link) Thanks! Link to comment Share on other sites More sharing options...
xCROv Posted April 8, 2018 Share Posted April 8, 2018 There is a UDF around here for google drive. I'm not sure if it still works because the last time I used it was like 5 years ago but you could try that. If you're not wanting to purchase a domain and hosting service then you could look at hosting a apache server on your computer or something. I'm sure there are free hosting sites somewhere. Link to comment Share on other sites More sharing options...
Danyfirex Posted April 9, 2018 Share Posted April 9, 2018 Hello. this should work. Local $sText=BinaryToString(InetRead("https://drive.google.com/uc?id=1Cmk5-Mr10CwDcie37sb4AmhHj6D8S9C5&export=download")) ConsoleWrite($sText & @CRLF) Saludos Skysnake and coffeeturtle 1 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Israelks Posted April 9, 2018 Author Share Posted April 9, 2018 Thanks alot! it worked! Link to comment Share on other sites More sharing options...
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