title: Autoit controlsend remote desktop
body: <p>I have a remote desktop and i'm trying to run a simple script to prevent idle session timeout, which is 3 min (quite annoying). The script should, for example, press "A" key every 2.5 min or so.</p>
  
  <p>Problem is, the remote desktop window is often inactive/minimized and:</p>
  
  <p>1) if i try to run such a script "inside" the remote desktop, i still get disconnected, despite it actually works (continues to type or create/delete files etc even as the "idle timer expired" message is on screen). i believe the system wants some "external" action.</p>
  
  <p>2) if i run the script on my PC, it doesn'do anything at all on the remote desktop (i had an open notebook there, and there was no typing):</p>
  
  <p>ControlSend("[CLASS:TscShellContainerClass]", "", "[CLASS:OPContainerClass; INSTANCE:1]", "{A}")</p>
  
  <p>I think the problem lies with the "controlid" part, which i got via autoit window info. If i set controlid as "" - it works, but only if the window is currently active.</p>
  
  <p>I've seen a registry key solution, but doesn't seem to work for me.</p>
  
  <p>If anyone has any ideas about fixing this, please, don't hold back:)</p>