I am making a bot that can type but when it presses enter the program closes while it is not done
import sched, time, pyautogui
s = sched.scheduler(time.time, time.sleep)
def do_something(sc):
pyautogui.write('hello')
pyauogui.press('enter')
s.enter(30, 1, do_something, (sc,))
s.enter(5, 1, do_something, (s,))
s.run()
I found this code on a forum to create a loop that waits x time before repeats but it closes when it comes to the line pyauogui.press('enter') why is this?