![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Aug 2006
Posts: 320
OS: XP Pro, Vista Business, Suse Linux, Win98 SE
|
Ping program
Hello,
I am trying to write a program on how to automate a pinging process. I just want to be able to copy an IP address off of one excel page, then be able to paste in cmd prompt and ping it and then have it switch back to the excel page and enter in if it resolved or not. Can anyone help me with this? I was thinking of writing an autohotkey script but... I am not sure how to make the program figure out if it pinged or not. PLEASE help! |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,884
OS: Vista, various linux distros
|
Re: Ping program
Hey, why an exel page? could you not use a batch file &/ some text input?
Autohotkey does sound alright for it, you could use the Autohotkey script recorder for most of it.... As for working out whether it has worked or not, you could probably use an input to file thing(sorry that wont make sence i can't remember the correct name right now)... so that the ping command becomes something like "ping [ipAddress] > temp.text" then open it (/read it) using FileRead(http://www.autohotkey.com/docs/commands/FileRead.htm), then use IntStr(http://www.autohotkey.com/docs/Functions.htm#BuiltIn[scroll down]) to find out if the file contains the string "recieved 100%" (or whatever it is)... Cheers, Jamey |
|
|
|
|
|
#3 (permalink) |
|
Manager
Join Date: Sep 2004
Location: Colorado
Posts: 988
OS: Mac OS 9.1, Mac OS X 10.5.8, WinXP Pro, FreeBSD 6.0, Gentoo Linux
|
Re: Ping program
A language like Ruby, Python or Perl would be perfect for this, but you'd have to learn one of the languages. I've never used Autohotkey (looks to be Windows-specific?), so I can't say how easy or hard this would be with it.
Instead of using an Excel spreadsheet, consider using a CSV (Excel can save spreadsheets as those). CSV's are generally easy to handle in programming languages and spreadsheet programs can open them up.
__________________
![]() Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it. When posting what errors you get, please give the full message. It makes helping you much easier. |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Aug 2006
Posts: 320
OS: XP Pro, Vista Business, Suse Linux, Win98 SE
|
Re: Ping program
alright, yeah I'm not to familiar with Ruby and I don't know of the syntax for python. Thanks guys, I've made a nice AutoIT script. Yes, it is windows specific but AutoIT is nice because it can run on just about any Windows machine. Anyway, thanks guys I appreciate the response.
I'll have to look into those other languages, I only know java really, I kind of want to dabble in C# and C++ because I think those languages could help me with simple stuff like this to and more. Anyway, thanks again guys. |
|
|
|
![]() |
| Thread Tools | |
|
|