How to automate the f5 keystroke on a particular window

3.8k views Asked by At

I need to send the "f5" keystroke to a specific application once every 60 seconds. The application remains running in a fixed position on one of three screens.

Is there any way to automate this keystroke without having to remain in focus?

1

There are 1 answers

4
ProgSnob On
import pyautogui
import time 

while True:
    pyautogui.press('f5')
    time.sleep(60)