gaiaplay Posted March 28, 2007 Share Posted March 28, 2007 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. 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. Link to comment Share on other sites More sharing options...
sandyd Posted March 28, 2007 Share Posted March 28, 2007 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 ]--- Link to comment Share on other sites More sharing options...
gaiaplay Posted March 28, 2007 Author Share Posted March 28, 2007 (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 March 28, 2007 by gaiaplay Link to comment Share on other sites More sharing options...
sandyd Posted March 28, 2007 Share Posted March 28, 2007 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 ]--- Link to comment Share on other sites More sharing options...
gaiaplay Posted March 28, 2007 Author Share Posted March 28, 2007 (edited) thanks Edited April 20, 2010 by gaiaplay Link to comment Share on other sites More sharing options...
sandyd Posted March 29, 2007 Share Posted March 29, 2007 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 ]--- Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now