Jump to content
Sign in to follow this  

Need help if possible

Recommended Posts

Hey all, just wondering if this could be possible or not. Not going to claim to have any knowledge with scripts, or this program at all because I don't. I am trying to find a program to autorun software on my computer and others in my house.

So for a little background. I am having issues with my ISP. My net is dropping repeatedly, and they keep telling me to go through their tech support and deal with their whole idiotic process that does me zero good, because as soon as the connection is working they assume all is well and tell me to have a nice day. I have called them several times now, and now all they want to tell me is to monitor my connection, and call them the next time it messes up, which usually happens late night when I am either asleep, or too tired to deal with them.

So I have downloaded a program to monitor the connection, and I am going to install it on all of the computers in my house. And to make it easier so I don't have to go through the house and check it on each computer to make sure it is running and working I need something that can autorun it and make sure it is constantly on to create logs 24/7. A friend told me that AutoIt may be able to do exactly what I need, but I have absolutely zero idea how to configure stuff, or if this program will even allow me to do this at all.

I read a couple of the tutorials, but honestly it seems like it would take some sort of knowledge of this program to get this to do what I need it to, if it is possible to at all. The issue is that I really do not have time to go through tons of forums/FAQs/tutorials to try and get this working. I don't want to learn how to use this program, I just want it to do one thing for me so that I can go back to work and not have to worry about sitting here staring at my modem lights all day.

So, is anyone out there kind enough to just reply telling me how to setup this program to autorun an exe whenever it is not currently running? Or tell me if it is possible, or even of another program that could do what I need? At this point I really don't care how I get this done, I just need it to be done so that I can tell my ISP what is going on, and when it is going on, because apparently it is also my job to do their job for them while trying to work to pay their ridiculous internet bill...

Share this post

Link to post
Share on other sites

Well, this is more of an exercise in parsing than anything and it's not completely infallible unless there's never been a situation where your computer wasn't able to connect to the internet, but others could.

1). Write a function that pings google, and returns true or false as appropriate.

2). Write another function that generates a timestamp.

3). Write another function that logs output to a file.

4). Write the main function, which uses steps 1 through three and does them continuously to any given resolution you desire.

You're going to need to brush up on FileOpen, FileFlush, FileClose, While loops, and the Ping() function. If you take all those components and put them together, then you'll be able to figure it out from there.

The desired output should be a CSV file (basically, values separated by a comma) which you can later open up in excel, you'd want the output to look something like this:

(<timestamp>), <result of function in step1>)

-- Alex

It sounds to me like this is one of your very first AutoIt scripts, and perhaps your very first glimpse into programming itself. If that's the case, here are some tips:

1). Don't get frustrated and quit (at least not immediately).

2). If you find a particular function or procedure twisty and hard to understand as a whole, then piecemeal the task into little subtasks that you have more control over.

3). Global variables are evil, don't use them unless you have to.

4). Seek help.

5). Don't just copy and paste code without understanding what it does.

I hope this helps.

When you're finished with your script, come back and post back.

Have fun :-)

-- Alex

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...