title: Autoclicker that clicks left click and uses left click as the hot key
body: <p>This seems really simple but, I realized the issue is that when pyautogui left clicks the key state is reset to up even though I may still be holding down left click.</p>
  <pre><code>import win32api
  import pyautogui
  
  
  state_left = win32api.GetKeyState(0x01) 
  pyautogui.PAUSE = 0.06
  stop_key_state = win32api.GetKeyState(0x50) 
  
  while True: 
  a = win32api.GetKeyState(0x01) 
  b = win32api.GetKeyState(0x50)
  
  if b &lt; 0:
      False
  
  if a != state_left:  # Button state changed 
      state_left = a 
      if a &lt; 0:
          while True:
              a = win32api.GetKeyState(0x01)
              if a &lt; 0:
                  pyautogui.click()
                  #print('Left Button Pressed') 
              else:
                  False
      else: 
          print('Left Button Released')
  </code></pre>