Sign in to follow this  
Followers 0
ThCam

Find Image on Screen

5 posts in this topic

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



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

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

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.

[center]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.[/center]

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