PyAutoDraw Code
October 29, 2022
import pyautogui
import time
# http://www.pillalamarri.in/python/pyautodraw-code/
# time to change tabs from editor to paint;
time.sleep(10)
# it will remain clicked till program ends;
pyautogui.click()
# can be varied according to convininence
distance = 250
while distance > 0:
# right
pyautogui.dragRel(distance, 0, duration = 0.1)
distance -= 5
# down
pyautogui.dragRel(0, distance, duration = 0.1)
# left
pyautogui.dragRel(-distance, 0, duration = 0.1)
distance -= 5
#up
pyautogui.dragRel(0, -distance, duration = 0.1)
# http://www.pillalamarri.in/python/pyautodraw-code/
Posted in Python