I'm trying to make PyCharm open the desmume app and a rom. I also want it to press a through the opening skippable cutscenes (it's a pokemon rom). Using pyautogui I've managed to open desmume, and a rom, but then I can't press the a button to get passed the opening cinematic. Using the pyautogui press function I can press the desired key in other apps (like chrome), but it doesn't have any effect on desmume.
'import pyautogui
import time
print("Hello world")
pyautogui.click(1239, 1070) #opening desmume
time.sleep(1)
pyautogui.click(1093, 250) #opening rom select
pyautogui.click(1135, 263) #opening rom
time.sleep(10) #waiting for rom to load
pyautogui.press("k") #pressing k, which if I do manually works as intended, but not if I use a program'