Detecting specific pixel color - noob help

Discussion in 'Mac Programming' started by Jryder, Nov 27, 2009.

  1. Jryder macrumors newbie

    Joined:
    Nov 27, 2009
    #1
    Hi, i'm trying to automate a routine task, but the timing is not exact so i can't have applescript do a periodic keystroke, it needs to be hit at just the right time. i was thinking that if i had the script wait until a certain pixel turned a certain color then keystroke, but i have no idea how to do this. any help would be appreciated, cause i am not a programmer, i just like to mess with the stuff. thanks.
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    Describe the problem you're trying to solve. Be specific.

    What you've done is describe a proposed solution, but you haven't described the actual problem. Since you're not a programmer, you have no way to assess the real viability of your solution. I'm not saying that to be demeaning or argumentative, and your situation is hardly unique. It's one of the most common responses I make, even to other programmers: What is the real problem you're trying to solve here?
     
  3. Jryder thread starter macrumors newbie

    Joined:
    Nov 27, 2009
    #3
    ok, what im trying to do is have my script wait until a specified pixel on my screen turns blue, then keystroke. i really don't know the much commands in applescript, so if there is a good reference guide with them all listed and their functions could you let me know where to find it? Thanks.
     
  4. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #4
    You've described your solution again, not the actual problem you're trying to automate.

    What is happening at that location that you expect it to turn blue? Is it over a control in a window? Whose window (which app, exactly)? Which control?

    Might the pixel location be different for any reason? Might the color be different for any reason? If the pixel-detection is on the order of milliseconds or microseconds, would that be too fast? If the pixel-detection is on the order of seconds or tens of seconds, would that be too slow?
     

Share This Page