So i went looking for the same thing and i found that this works
#NoEnv
Send {F11}
you need to go to mang emulators, go to mesen , go to pause screen, go to on resume and put this in there , i had to put send f11 2x because i had to press f11 twice to get it too work. idk a single then about script, i used another script that someone else gave me for a different reason and it started with #noenv then the commands so i guess #noenv starts the script??????????????? anyway worked for me idk if you even care anymore but this worked for me.