Sign in to follow this  
Followers 0
gaiaplay

Scanning images and assigning it as a variable/object

6 posts in this topic

Hello guys,

I am new to autoit and I am not sure if it can help me with the task I need. I have set a picture to make it easier for me to explain.

post-21985-1175088175_thumb.jpg

Base on the image above, there are 3 objects A, B and C.

1) Is it possible for me to capture the 3 images and assign them to a variable/object for each one of them? If it can be done, can you please write a sample code for it.

2) Second, if they can be assign as an object, can you do a comparison for each of them?

I am not asking for an entire script, maybe some pseudo codes will help me since I am new to images/pics/objects.

Share this post


Link to post
Share on other sites



If you just want to check that the objects are the same, then you can use the PixelChecksum function to create a checksum for each image and compare the checksums.

What exactly is your need?


----[ SandyD ]---

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

There will be random instances that A, B or C will appear in the screen in a specific static position. If they appear/change, I want to know if it is A, B or C.

Edited by gaiaplay

Share this post


Link to post
Share on other sites

OK, find out where on the screen A, B, C appear and notes the coordinates of the top, left, bottom, right of each one

When they appear, do a pixelchecksum of the area and store that. Now you know what to look for.

Create a loop and poll the areas (do a pixel checksum every once in a while) until they match with the ones you have stored.


----[ SandyD ]---

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

thanks

Edited by gaiaplay

Share this post


Link to post
Share on other sites

Whe you run the program the first time, just remember what the values are, (use MsgBox if req.) and set the constants to be those values.


----[ SandyD ]---

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