Jump to content

Recommended Posts

Posted

Hi all,

Have a script that needs to wait for a program to finish drawing. The time does vary depending on the complexity of the drawing.

I would like to avoid a kludge like sleep(30000).

I tried picking up "Finished drawing" from the status bar using StausBarGetText() - but it's obviously a non-standard status bar.

Is there a "CPU not very busy" thing that I could check once per second perhaps?

Or is there a better way?

Thanks, Ross

Posted

The work-around I found that works was to use PixelGetColor() at the screen location where "Drawing" changes to "Finished". Several pixels change to grey when the D changes to F.

I don't need a better method now.... but if there is one, feel free to say so!

Posted

You could poll a pixelchecksum every half a second until the values stop changing. Would that work?

Yes, that would have been quicker to code. It was fiddly getting an exact pixel to test. I'll use your suggestion next time. Thanks. :)

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
×
×
  • Create New...