I have a program that is always open and every now and again I need to update some background files for it but then I need to hit a key in the program to refresh it. I'm looking for a way to automate that refresh once the updating script has finished.
What i need to do:
1 - go to the open program on my computer which is called
Program
2 - press
ctrl + shift + r
to perform the refresh
This was a script that I have tried but no such luck from within Pycharm:
import pyautogui
from time import sleep
import subprocess
p = subprocess.Popen(r'C:\Users\xxx\Desktop\xxx\Program.exe')
pyautogui.keyDown("ctrl")
pyautogui.keyDown("shift")
pyautogui.press("r")
pyautogui.keyUp("ctrl")
pyautogui.keyUp("shift")
p.kill()
This script keeps me in pycharm and sends me to a find and replace task. Any ideas? thanks!