Sign in to follow this  
Followers 0
Inconspicuous

Ping @error=1

33 posts in this topic

#1 ·  Posted (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)
EndIf
gives @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 by Inconspicuous

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

Sorry, forgot to mention that I disabled my firewall, as well. It still gave the same result.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

For the sake of asking, what version of AutoIt are you running?

Share this post


Link to post
Share on other sites

The latest, v3.3.6.1.

Share this post


Link to post
Share on other sites

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!"

Share this post


Link to post
Share on other sites

Pinging my own system works fine, @error=0.

Share this post


Link to post
Share on other sites

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!"

Share this post


Link to post
Share on other sites

#14 ·  Posted (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 by Inconspicuous

Share this post


Link to post
Share on other sites

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!"

Share this post


Link to post
Share on other sites

#16 ·  Posted (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 by Inconspicuous

Share this post


Link to post
Share on other sites

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!"

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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)"?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0