Flanders42 Posted December 5, 2012 Share Posted December 5, 2012 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 Link to comment Share on other sites More sharing options...
Chance Posted December 5, 2012 Share Posted December 5, 2012 You're turning your variable into a string 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 Link to comment Share on other sites More sharing options...
Flanders42 Posted December 5, 2012 Author Share Posted December 5, 2012 Ahh, I see...thanks so much! 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