Advertisement
sabiansoldier

Untitled

Oct 13th, 2020
1,978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. import pyautogui
  2. import time
  3.  
  4. #pyautogui.displayMousePosition()  --> Use this to identify corner pixels
  5.  
  6.  
  7.  
  8. pyautogui.moveTo(20,20,0.5)
  9. pyautogui.click()
  10.  
  11.  
  12. def screengrab(book_length):
  13.  
  14.     time.sleep(1)
  15.  
  16.     print("Taking Screenshots...")
  17.  
  18.     for i in range(book_length):
  19.  
  20.         print(f"{i+1}/{book_length}")
  21.        
  22.         pyautogui.hotkey("shift","ctrl","alt","s")
  23.         time.sleep(0.5)
  24.         pyautogui.moveTo(2173,1394,0.5)     #bottom right
  25.         time.sleep(0.5)
  26.         pyautogui.dragTo(275,55,2)     #top left
  27.         time.sleep(0.4)
  28.         pyautogui.moveTo(1070,510,1)
  29.         time.sleep(0.3)
  30.         pyautogui.press("right") #next page
  31.         time.sleep(1)
  32.     print("Done")
  33.  
  34.  
  35. time.sleep(2)
  36.  
  37. screengrab(100)
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement