Reputation: 1
Python
screenshot not working in IDE python 2.7.14
. Not sure what I am missing in the code below:
import pyautogui, time
x=l
img = pyautogui.screenshot()
while x < 4 :
img.save("C:/Users/ABC/OneDrive/Desktop/Screenshots"+str(x)+".png")
x=+1
time.sleep(2)
Upvotes: 0
Views: 669
Reputation: 705
import pyautogui
import time
x = 1
while x < 4:
img = pyautogui.screenshot()
img.save("C:/Users/ABC/OneDrive/Desktop/Screenshots"+str(x)+".png")
x += 1
time.sleep(2)
Upvotes: 1