Inconspicuous Posted June 25, 2010 Share Posted June 25, 2010 (edited) My Ping function doesn't work. It always returns @error=1. For example, Ping("www.google.com") If Not @error Then MsgBox(0, "Ping", "Online.") Else MsgBox(0, "Ping", "@error=" & @error) EndIfgives @error=1 every time I try it. I've tried pinging www.google.com in cmd and it worked. I'm running on Windows 7 Professional x64. Edited June 25, 2010 by Inconspicuous Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 25, 2010 Share Posted June 25, 2010 You most likely have a firewall issue. Many firewalls block ICMP traffic by default and the user never knows. It may also be that your firewall is specifically blocking your script. Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 25, 2010 Author Share Posted June 25, 2010 Sorry, forgot to mention that I disabled my firewall, as well. It still gave the same result. Link to comment Share on other sites More sharing options...
JohnOne Posted June 26, 2010 Share Posted June 26, 2010 Can you ping anywhere at all? AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 26, 2010 Author Share Posted June 26, 2010 Can you ping anywhere at all?Yes, I tried. I get the same error for any domain I try. And all of them can be pinged in cmd. Link to comment Share on other sites More sharing options...
ichigo325 Posted June 26, 2010 Share Posted June 26, 2010 (edited) Try... #RequireAdmin Ping("www.google.com") If Not @error Then MsgBox(0, "Ping", "Online.") Else MsgBox(0, "Ping", "@error=" & @error) EndIf Edited June 26, 2010 by ichigo325 [size="2"][font="Lucida Sans Unicode"][b][/b][/font][/size] Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 26, 2010 Author Share Posted June 26, 2010 (edited) Still the same result. I also tried compiling with:#Region #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #EndRegion Ping("www.google.com") If Not @error Then MsgBox(0, "Ping", "Online") Else MsgBox(0, "Ping", "@error=" & @error) EndIf Edited June 26, 2010 by Inconspicuous Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 26, 2010 Share Posted June 26, 2010 For the sake of asking, what version of AutoIt are you running? Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 26, 2010 Author Share Posted June 26, 2010 The latest, v3.3.6.1. Link to comment Share on other sites More sharing options...
GEOSoft Posted June 26, 2010 Share Posted June 26, 2010 Every method shown so far works for me and I've tried them on 3 systems. They are correct and they work so the problem has to be something related to your system. Just for curiosity, try pinging your own system (127.0.0.1) and see what the return is. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 27, 2010 Author Share Posted June 27, 2010 Pinging my own system works fine, @error=0. Link to comment Share on other sites More sharing options...
JohnOne Posted June 27, 2010 Share Posted June 27, 2010 Does InetGet() work? AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
GEOSoft Posted June 27, 2010 Share Posted June 27, 2010 one more test try it with 87.106.244.38 George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 27, 2010 Author Share Posted June 27, 2010 (edited) Same result and I can ping it in cmd. I just reinstalled AutoIt and tried restarting my computer, but it didn't help. I attached my system information from DxDiag if it's any help. Could it be that I disabled a service that is required?DxDiag.txt Edited June 27, 2010 by Inconspicuous Link to comment Share on other sites More sharing options...
GEOSoft Posted June 27, 2010 Share Posted June 27, 2010 It fails in both Scite and compiled? George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 27, 2010 Author Share Posted June 27, 2010 (edited) It fails in both Scite and compiled?Yes, it fails in both. I compiled using default settings and ran the output .exe file with firewall disabled. It still doesn't work. Edited June 27, 2010 by Inconspicuous Link to comment Share on other sites More sharing options...
GEOSoft Posted June 27, 2010 Share Posted June 27, 2010 This is definitly system related and nothing to do with AutoIt. If you can connect fine to the internet then we should look elsewhere. Compile the script, copy it to your desktop, R-Click on it and choose "Run as Administrator", see what happens. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 27, 2010 Author Share Posted June 27, 2010 This is definitly system related and nothing to do with AutoIt. If you can connect fine to the internet then we should look elsewhere.Compile the script, copy it to your desktop, R-Click on it and choose "Run as Administrator", see what happens.It still didn't work. I'm using ESET Smart Security, and I ran the compiled script using admin with all security disabled. Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 27, 2010 Share Posted June 27, 2010 It still didn't work. I'm using ESET Smart Security, and I ran the compiled script using admin with all security disabled.As in, you right clicked the tray icon and selected "Do not filter network traffic (Disable Firewall)"? Link to comment Share on other sites More sharing options...
Inconspicuous Posted June 27, 2010 Author Share Posted June 27, 2010 As in, you right clicked the tray icon and selected "Do not filter network traffic (Disable Firewall)"?I opened up the ESET control panel and went to "Setup" to disable Firewall, all Antivirus and Antispyware, and Antispam protection. 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