Sign in to follow this  
Followers 0
aliaspanther

Program Idle Detection & Action?

5 posts in this topic

Hey everybody,

I just recently (within the past week) came across AutoIt and started playing with it and I gotta say I love it. It has helped me create workaround scripts for certain problems I've been facing for months.

Anyways, on to the question at hand:

Is there any possible way to create a script that runs in the background and monitors a specific program for Idle time?

Reason being is I run this older program that fetches data from a vendor by a dial-up connection (I know, "Eek!" right?).

But every so often, the program will "freeze" or stop communicating, and I have to initiate a Ctrl+Alt+Delete, End Task, Re-Launch program to fix it until the next time it happens. Unfortunately the programmer who created it passed away a couple years ago, so just getting an updated version would really work.

Now when the program idles or stops, it does it at the same spot each time (there is a readout box displaying its activity).

For example, a successful information transaction would look like this:

ATH

OK

ATDT18775555555

CONNECT 1200

...

...

...

When it idles or freezes, it stops at that ATDT line. So I want to know if there is a way to make an AutoIt script detect when the program is idle at that line without any further data for... say 20 seconds. If it detects as true, then it will auto-initiate that Ctrl+Alt+Delete sequence I mentioned, and then go back to waiting in the background for the next occurrence. If it does detect activity or further information (the CONNECT 1200 and below), it won't do anything except continuing to wait in the background.

Is this feasible? If so, any way you could instruct me on this? I appreciate it. Thanks!

- AP

Share this post


Link to post
Share on other sites



Hi,

yes it should be possible.

Have a look at while 1 wend as the main loop.

Processclose for ending your program

Run for starting it again

Function _ProcessGetPriority(_ProcessGetPriority )

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

You said that if that program freezes it stops at that line. So make autoit check for that in an endless while 1 wend loop and make IF that readoutbox isnt showing progress THEN do what Xenobiologist is said (kill it and start it again)

Share this post


Link to post
Share on other sites

Thanks guys for the suggestions. Apparently we're putting this machine out of commission and replacing the program with a new vendor now, so I guess the script isn't really needed.

But, I'm still curious on learning the process of doing this. Being I'm still new to AutoIt, I'm still not certain on how to do what you suggest. Any chance you can do a markup of what may need to be done? Or be able to point me to a detailed "Learning AutoIt" guide so that I can brief myself on the different functionalities?

THanks!

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