title: change the coordmode from the active window to any window
body: <p>this is the situation:</p>
  
  <p>1) I have 3 Windows;</p>
  
  <p>2) My mouse is positioned over any of them (active table under the mouse cursor);</p>
  
  <p>3) I have the ahk_id of both Windows (stored in global variables);</p>
  
  <p>4) Every 5 seconds, I would check (regardless of the movement of the mouse cursor), if a pixel of a specific window (window1, window2...) has a certain color;</p>
  
  <p>5) Click with a controlclik of that pixel and regain control of the starting window under the mouse cursor.</p>
  
  <pre><code>checktime(){
  var := Mod(A_Sec, 5)
  if (var = 0){
      checkpixel(window1) ; window1 is an ahk_id, stored in a global variable
      checkpixel(window2)
      checkpixel(window3)
  }
  
  checkpixel(window){
  CoordMode, ToolTip, window ; this line of code is definitely wrong, what do you recommend?
  pixelgetcolor, color, 440, 295
  if(color=0x4E3500){
      controlclick, x440 y295, ahk_id %window%
  }
  </code></pre>
  
  <p>thanks in advance for the answers!</p>