   Question about resolution and pixel locations
  Sorry about the novelI am writing a C# program to help me play a video game. The program monitors for the color of pixels in certain locations to tell if certain abilities are available or not and then it makes decisions about which ability to use.I can get this set up for my computer no problem. But I want to be able to give my friends a copy too and they will be using different resolutions. I am willing to go through and hard code the location of every spot that needs to be monitored for every resolution BUT... will those X,Y coordinates on my screen ALWAYS point to the exact same thing on my friends screen?For example if at 1680X1050 resolution at (100, 152) is where my health meter is at 10% and I hard code (100, 152) into my app for 1680x1050 resolution will that point to where my health meter is at 10% on ANY computer so long as it is using 1680X1050 resolution?I am aware other things could throw it off such as:-playing in windowed mode-playing on right screen if using two monitors-using an app that alters location of pixels------------This question is too long I know. Let me try and sum it up with a simple question. If at a given resolution the coordinates of my characters nose are (545, 717) will those ALWAYS be the coordinates of my characters nose on any Windows system using the same resolution for the game except for special circumstances like where the user is playing the game in a window or the user is using more than one monitor, etc   
  It all depends on how the game was programmed. In many simple cases: yes, the nose would have the same location. But there are a lot of reasons why it might be not that simple. E.g., the player's health might infuence his stance or the player selects a female character that is smaller in height. Processing pixels is really hard (OCR to the next level). It would be easier if it is a browser game (or flash or silverlight or WPF) cause they have graphical trees (DOMs) that allow interaction with the UI regardless of resolution.What game are you writing the robot for?   ;  You could consider to use normalized coordinates (0,1) and then convert them to the actual pixel position using the current resolution, but this actually depends upon how the graphic of the game is done: graphic elements have constant size and they simply adapt the position (i.e. the health bar in Quake which had constant size no matter which resolution you used) or did they actually resize?   ;  The game is WOW.I need to hard code the exact pixel (+- a few) of the spot in the action box where the ability is at its very last spot for cooldown. That way as soon as it becomes available I can use it.I could set it up so my users setup the app but that might be to non-user friendly.Do you know if hard coding pixel spots will work for wow?   ;  Isn't the rendering usually done client side? Why can't you hook into that?   ;Quote:Original post by smchugh1982The game is WOW.I need to hard code the exact pixel (+- a few) of the spot in the action box where the ability is at its very last spot for cooldown. That way as soon as it becomes available I can use it.I could set it up so my users setup the app but that might be to non-user friendly.Do you know if hard coding pixel spots will work for wow?Wait, so let me get this straight.You are writing a piece of software that monitors ability cooldowns on World of Warcraft and then uses said ability for the user the instant it comes off cooldown?This is against Blizzards policy as the following screenshot I took in game suggests.Uploaded with ImageShack.us;  It's not our responsibility to enforce Blizzard's terms of service. That said, this is a game development site... it's not for general programming questions.   