asmd23 Posted January 7, 2008 Report Share Posted January 7, 2008 Hello all, I'm trying to put together a very basic macro and was wondering if I could get some help. Here's what I'm trying to do. I want ME to scan a specific portion of my screen(a rectangular area) and check for two possible colors. So for instance, if it finds Blue I want it to do one thing, and if it finds Red then do another. I've found the Mouse Locator and I have the pixel colors I want to search for as well as the coordinates of where to search for, I'm just not sure how to write the actual script. Any help is highly appreciated! Quote Link to comment Share on other sites More sharing options...
jason Posted January 7, 2008 Report Share Posted January 7, 2008 You will need to use the Get Pixel Color command to capture the color at the location. The value is stored in an integer variable that you can then compare. Get Pixel Color If %N1% = XXXXX Do this End If If %N1% = YYYYY Do this End If You can use the Mouse Locator to determine the colors. Quote Link to comment Share on other sites More sharing options...
stan Posted January 7, 2008 Report Share Posted January 7, 2008 Hi, I would just use a couple of If Variable statements. Check the coordinate and see if it matches one of the two If statements. If it does, the macro completes the steps you defined for the red or blue match. Otherwise it ignores the steps. If Variable %N1% = 11111 Do the steps for red End If If Variable %N1% = 22222 Do the steps for blue End If Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.