Jump to content
Sign in to follow this  
ThCam

Find Image on Screen

Recommended Posts

ThCam

Hi

I have an image which changes his position on the screen from time to time. I need to click on it, so I have to find out his position. What is the best and fastest way for doing that?

Share this post


Link to post
Share on other sites
cdkid

Look at PixelSearch in the helpfile.

~cdkid


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites
SmOke_N

Hi

I have an image which changes his position on the screen from time to time. I need to click on it, so I have to find out his position. What is the best and fastest way for doing that?

You'll have to look at 2 options... hopefully the easiest option is that the picture is a control, and you can look at ControlGetPos()... if it is not, you'll have to get the PixelCheckSum() of the picture, and search the entire area of the screen where it 'should be' until you find it, and return the coords from there.

Also, if this has to do with a browser, you could look at Dale's IE.au3 in the scripts and scraps forum.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
ThCam

hopefully the easiest option is that the picture is a control, and you can look at ControlGetPos()... if it is not, you'll have to get the PixelCheckSum() of the picture, and search the entire area of the screen where it 'should be' until you find it, and return the coords from there.

Also, if this has to do with a browser, you could look at Dale's IE.au3 in the scripts and scraps forum.

Unfortunately it isn't a control and it hasn't to do with a browser. I guessed I have to search the entire area of the screen, but this takes too much time... So I think I have to find another solution... Thanks anyway!

Edited by ThCam

Share this post


Link to post
Share on other sites
SmOke_N

Unfortunately it isn't a control and it hasn't to do with a browser. I guessed I have to search the entire area of the screen, but this takes too much time... So I think I have to find another solution... Thanks anyway!

Well if you find a 'Better' solution, to recoginizing a picture, that could be anywhere on a screen, that is much faster than what I've stated.... Please post it back here, it would help a great many people. Good luck in your venture.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.