import pyautogui, time , pyperclip ,keyboard
pyautogui.confirm ("начать?")
def on_key_press(event):
while True:
f = open("oxi.txt", "r", encoding="utf8")
for word in f:
time.sleep(1.1)
if ... event.name == "f4"
keyboard.on_press("on_key_press")
#pyautogui.hotkey("ctrl", "v")
#time.sleep(0.65)
pyperclip.copy("")
pyautogui.hotkey("ctrl", "v")
pyperclip.copy(word)
pyautogui.hotkey("ctrl", "v")
pyautogui.press("enter")
time.sleep(0.0001)