Home > Blockchain >  how to write repeatedly numbers for 900 to 1000 with pyautogui
how to write repeatedly numbers for 900 to 1000 with pyautogui

Time:01-05

import pyautogui as pag
import time

D = 900

for D in range(100):
    pag.write(D)
    pag.press("Enter")
    D  = 1

i want it to type untill its get to 1000

CodePudding user response:

I believe the code you need is:

import pyautogui as pag

D = 900

while D < 1001
    pag.typewrite(D)
    pag.press('Enter')
    D  = 1

CodePudding user response:

import pyautogui as pag

D = 900

while D < 1001
    pag.typewrite(f"{D}")
    pag.press('Enter')
    D  = 1

Int has to be string!

  •  Tags:  
  • Related