Sign in to follow this  
Followers 0
Ropetin Again

Detecting Change in Pixel Color

5 posts in this topic

Let me preface this by saying I'm not what you would call a programmer, so my question might seem obvious. I'm not dumb though, and can usually figure something out well enough to copy and paste example code and make it do what I need it to.

I'm automating a process at work with AutoIT, and have got it almost working 100%. However, I'm stuck on detecting when a certain task has finished. Specifically I'm using a piece of software to delete some files across the network. Depending on network conditions it can take anything from 10 seconds, to 60 seconds, but never more than 90 seconds. Right now I have a Sleep statement waiting 90 seconds, before it assumes the delete has finished, and moves on. However, this causes lots of wasted time, if the delete process only takes 10 seconds. The only indication that the delete is in process is a little blue icon at the bottom of the screen, which goes away when the delete is finished.

I know I can use PixelGetColor to check the color of a specific pixel to see whether its blue or not. However, how do I make it keep checking (say once every second) until it changes from blue back to gray? Any suggestions would be really appreciated.

Thanks, and I hope I don't sound too stupid!

Share this post


Link to post
Share on other sites



I'm automating a process at work with AutoIT, and have got it almost working 100%. However, I'm stuck on detecting when a certain task has finished. Specifically I'm using a piece of software to delete some files across the network. Depending on network conditions it can take anything from 10 seconds, to 60 seconds, but never more than 90 seconds. Right now I have a Sleep statement waiting 90 seconds, before it assumes the delete has finished, and moves on. However, this causes lots of wasted time, if the delete process only takes 10 seconds. The only indication that the delete is in process is a little blue icon at the bottom of the screen, which goes away when the delete is finished.

why that complicated? Use FileDelete(), then you know when (and if) the files have been deleted!

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

why that complicated? Use FileDelete(), then you know when (and if) the files have been deleted!

Cheers

Kurt

Let me change the description of what I'm doing then, to explain why I can't use FileDelete(). I'm using a proprietary piece of software to delete some entries in a proprietary formatted database, that can only be accessed with the proprietary piece of software.

Thanks for your quick response!

Share this post


Link to post
Share on other sites

To answer my own question...

I was over thinking the problem, I just did a simple Do..Until loop and it worked fine.

Share this post


Link to post
Share on other sites

I bet it felt a lot better to figure it out on your own anyway ;).


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

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