Israelks Posted February 2, 2018 Share Posted February 2, 2018 Hello, i'm trying to use InetRead to get some information from a website, in my computer this script works fine, but in a specific computer it don't work Local $a= InetRead("https://meuarquivoteste.weebly.com/uploads/1/1/6/8/116881805/test.txt",16) Local $b = BinaryToString($a) MsgBox(0,"",$b) I also tried with winhttp.winhttprequest.5.1, works fine for me, but don't work on the another computer $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "https://meuarquivoteste.weebly.com/uploads/1/1/6/8/116881805/test.txt", False) $oHTTP.Send() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status MsgBox(0,"",$oReceived) Link to comment Share on other sites More sharing options...
Israelks Posted February 2, 2018 Author Share Posted February 2, 2018 This is what i want to see (using inetread) and this is what appears on the another computer Link to comment Share on other sites More sharing options...
Developers Jos Posted February 2, 2018 Developers Share Posted February 2, 2018 You state that InetRead() is having a problem .. and then go on in your initial post showing 2 pieces of code and an error, which is from the second scriptlet ...right? So for the first script: Have you checked what the returned error information is like described in the helpfile? Quote Return Value Success: a binary string and @extended set to the number of bytes downloaded. Failure: "" (empty string) and sets the @error flag to non-zero. For the Second script: Add an ComErrorHandler to your script and check the information of the error. This is the only way to get more inside as to why it fails on that particular pc. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Israelks Posted February 3, 2018 Author Share Posted February 3, 2018 Quote You state that InetRead() is having a problem .. and then go on in your initial post showing 2 pieces of code and an error, which is from the second scriptlet ...right? Yes. I got "1" error from inetread and this with the second script: Link to comment Share on other sites More sharing options...
orbs Posted February 3, 2018 Share Posted February 3, 2018 @Israelks, welcome to the AutoIt forum. the obvious cause would be that the "other computer" has connectivity issues with the target URL. the first COM error (which is the only important one, since the successive erroneous operations depend on the first one) hints of a DNS issue. is that "other computer" inside a corporate network? or protected by some additional means, such as a firewall? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
Israelks Posted February 3, 2018 Author Share Posted February 3, 2018 (edited) 3 hours ago, orbs said: is that "other computer" inside a corporate network? No, 3 hours ago, orbs said: or protected by some additional means, such as a firewall? i've tried disable the firewall but i got the same error, maybe the problem is DNS? how to know if the problem is DNS? Edited February 3, 2018 by Israelks Link to comment Share on other sites More sharing options...
orbs Posted February 3, 2018 Share Posted February 3, 2018 open a browser and type the full URL in the address bar (and press "Enter"). see if you get the text inside the file, or any error message. additional reading (first result when google "resolve dns issues") Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
mikell Posted February 3, 2018 Share Posted February 3, 2018 The issue seems IE related, this occurs frequently with Weebly The address in the code - as well as this one - doesn't work in my (old) IE browser You might try to update IE to the latest version 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