So I have ONE game that is giving me this problem, but still I'd like to fix it. And others might have the same problem with other games that behave the same way.
I have the PC game Slain on my cabinet. Like many PC games, when you launch the executable it displays a configuration pop-up where you can select windowed/fullscreen and resolution. Basically you just click OK and move on to the game. There is, as far as I can tell, no way to side-step this interstitial.
I wrote an Autohotkey script to deal with the interstitial, so when you launch the same from AM the script runs, acknowledges the pop-up, and the game starts.
The only hang-up is AM thinks the game is closing at some point in this process. So the game launches, the pop-up is dealt with, and Slain runs... but AM comes back to life in the background. It is as though AM thinks you launched the game and quickly exited it, when in fact the game is running.
I don't think this is caused by the script EXIT command either. I have all sorts of scripts that exit and they don't bring AM back out of sleep mode.
There are three ways I can think of that could address this issue, and I'd appreciate any advice on how to make any of them work.
1. If I knew what triggers AM to wake up after going to sleep in the background, maybe I could intercept that trigger in this case? That way AM would keep sleeping until the player really exits the game.
2. I could kill AM in this case, run the game, and then relaunch AM upon exit. The only problem is I don't know how to prevent it from doing the whole intro all over again. If I could skip the intro, I assume it would just return to the last game played (which would be perfect).
3. I could add a step to force AM back into sleep mode during the game's start-up process, if there is a means to do so.
Thanks!