title: Python Automated Click Script
body: <p>I am working on a program to make python auto click and type something in. I know this has been done before and asked before but no one has asked about recording mouse clicks to be "Played back" later on. I have the basic code set up from tutorials all over the place. I am wondering if I can get a hand with this. Here is what I have to this point:</p>
  
  <pre><code>import win32api, win32con
  import time
  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)
  
  print "Clicking 300, 300"
  click(300,300)
  
  time.sleep(3)
  
  print "Clicking 800, 800"
  click(800, 800)
  </code></pre>
  
  <p>How do I make this so the user can input and save a pre-generated script for clicks?</p>