Sign in to follow this  
Followers 0
Flanders42

ping script

3 posts in this topic

Hello all,

I'm trying to write a script that will ask for an address then ping it. I thought I had this correct, but it's not working at all. Here's my code so far.

Also, I've only been working in AutoIt for about 3 days...so I'm still extremely green.

$storenum = InputBox("Destination", "What store are you querying?")
Local $var = Ping(" & $storenum")
If $var Then
    MsgBox(0, "Status", "Online, roundtrip was:" & $var)
Else
    MsgBox(0, "Status", "An error occured with number: " & @error)
EndIf

Share this post


Link to post
Share on other sites



You're turning your variable into a string :P

look at the difference between mine and yours :)

$storenum = InputBox("Destination", "What store are you querying?")
Local $var = Ping($storenum)
If $var Then
MsgBox(0, "Status", "Online, roundtrip was:" & $var)
Else
MsgBox(0, "Status", "An error occured with number: " & @error)
EndIf

Share this post


Link to post
Share on other sites

Ahh, I see...thanks so much!

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