Unlocker.py 482 B

1234567891011121314151617181920
  1. from ctypes import *
  2. import time
  3. # while True:
  4. # u = windll.LoadLibrary('user32.dll')
  5. # result = u.GetForegroundWindow()
  6. # print(result) # 0则表示锁屏
  7. # time.sleep(2)
  8. import pyautogui
  9. pyautogui.FAILSAFE=False
  10. time.sleep(5)
  11. pyautogui.press('enter') # enter to login.
  12. #pyautogui.click(1025,513, 2) # click to show the password box
  13. time.sleep(1)
  14. pyautogui.typewrite("Asdfghjkl;'",2) # Type the password
  15. pyautogui.press('enter') # enter to login.
  16. time.sleep(2)