title: automatic press key in Python
body: <p>im currently trying to make a auto-clicker and then a auto-button presser.</p>
  
  <p>this is my code until now.</p>
  
  <pre><code>new=2;
  url="www.google.com";
  
  webbrowser.open(url,new=new);
  
  time.sleep(25)
  
  
  def click(x,y):
            win32api.SetCursorPos((x,y))
            win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0)
            win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0)
  click(700,300)
  
  time.sleep(3)
  </code></pre>
  
  <p>And after time.sleep(3) I want the spacebar to be pressed automatic (with 3sec sleep in between) 100 times. I have tried sendkeys, but cant find any download place.  </p>
  
  <p>Sorry for bad english, hope someone can help.</p>