title: AutoIt v3 Skips send() inputs
body: <p>I checked out AutoIt for my first time and got a little program to make some inputs for a little game to sell IronIngots(take IronIngots, use "Zuflucht"-Spell, sell IronIngots, use "Zuflucht"-Spell and from beginning). I suppose i made it so it should work, but sadly, it bugs a bit around. It's based on pressing keys for mey instead of user sitting there and always pressing the same keys. But sometimes it lags and skip single keypresses. Can u tell me if there are some mistakes? even if i start the programm with same startressources (same ingame position) Different results are spectated.</p>
  
  <p>Can u help me?</p>
  
  <p>Thats the code:</p>
  
  <pre><code>Sleep(3000)
  _Ausfuehren()
  
  Func _Ausfuehren()
      While 1
          _ganzeRundeMitBlut()
      WEnd
  EndFunc
  
  #cs
  Fertig
  #ce
  Func _ganzeRundeMitBlut()
      _EineRunde()
      _Bluttrank(3)
      _EineRunde()
      _Bluttrank(2)
  EndFunc
  
  #cs Fertig
  #ce
  Func _EineRunde ()
      _Silber()
      _Zuflucht(0)
      _Shop()
      _Zuflucht(1)
  EndFunc
  
  
  #cs Fertig
  #ce
  Func _Bluttrank($Anzahl)
      _Press("{ESC}")
      _Press("{ENTER}")
      _Press("{RIGHT}")
      _Press("{ENTER}")
  
      While $Anzahl &gt; 0
          _Press("{ENTER}")
          $Anzahl = $Anzahl - 1
  
          Sleep(2000)
      WEnd
  
      _Press("{ESC}")
      _Press("{ESC}")
      _Press("{ESC}")
  EndFunc
  
  #cs Fertig
  #ce
  Func _Zuflucht ($is_home)
      _Press("{ESC}")
      _Press("{DOWN}")
      _Press("{ENTER}")
      _Press("{ENTER}")
      _Press("{RIGHT}")
      _Press("{DOWN}")
      _Press("{DOWN}")
      _Press("{ENTER}")
      _Press("{ENTER}")
  
      If($is_home) Then
          _Press("{DOWN}")
          _Press("{ENTER}")
      EndIf
  EndFunc
  
  #cs Fertig
  #ce
  Func _Shop ()
      _Press("{UP}")
      _Press("{ENTER}")
      Sleep(200)
      _Press("{ENTER}")
      Sleep(500)
      _Press("{ENTER}")
      _Press("{ENTER}")
      _Press("{DOWN}")
      _Press("{ENTER}")
      _Press("{DOWN}")
      _Press("{DOWN}")
      _Press("{DOWN}")
      _Press("{DOWN}")
      _Press("{DOWN}")
      _Press("{DOWN}")
      _Press("{DOWN}")
      _Press("{DOWN}")
      _Press("{RIGHT}")
      _Press("{ENTER}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{UP}")
      _Press("{ENTER}")
      _Press("{ESC}")
      _Press("{ESC}")
  EndFunc
  
  #cs Fertig
  #ce
  Func _Silber ()
      _Press("{RIGHT}")
      _Press("{ENTER}")
      _Press("{ENTER}")
      _Press("{ENTER}")
      _Press("{ENTER}")
      _Press("{ENTER}")
  EndFunc
  
  #cs Fertig
  #ce
  Func _Press ($press_str)
      Send($press_str)
      Sleep(700)
  EndFunc
  </code></pre>