Jump to content

Need to Know When App is not busy


PeteS
 Share

Recommended Posts

I have a 3rd party application that I am manipulating with an AutoIt script. The AutoIt script has the the 3rd party app query a database. The result set is about 500K records, and it takes about 20 secs for the query to finish, and the app to be ready for the next command.

I can't figure out how to let AutoIt know when it is ready for the next command. The window always has focus. I can lose focus and get focus while the app is running the query. The cursor is an hourglass, but I'm not sure how to use that as a trigger.

I don't want to use a sleep() function because I am querying tables of different sizes. Most are very small.

Any ideas?

Thanks,

Pete S

Link to comment
Share on other sites

I used two things in the past...

- one was a function that queried the mous cursor type and when I got 10 successive ready cursors I continued. pretty dumb...

- the other one I have used was a query of processor cpu from a pid. when it stayed below a threshold for ten successive polls, I continued.

First off, though is to look for some visible clue and try to use that to realize success.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

I used two things in the past...

- one was a function that queried the mous cursor type and when I got 10 successive ready cursors I continued. pretty dumb...

- the other one I have used was a query of processor cpu from a pid. when it stayed below a threshold for ten successive polls, I continued.

First off, though is to look for some visible clue and try to use that to realize success.

Lar.

Thanks, Lar. I'm curious what you used to interrogate the CPU? Were you using ProcessGetStats()? If so, which stat were you looking at?

This sounds like it could work. My CPU usage is reeling at this time, along with I/O Reads or I/O Writes.

Pete S

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...