I'm like 100% sure Attract Mode has a specific way to work with steam games, but if you're trying to keep it all with Auto It launchers, you only have to modify the mame example a little bit:
You'll need to know the name of the game's exe when running. Just open task manager, right click, properties, and it's probably the contents of the text box at the top, plus .exe. The big difference is that you want to launch steam games with steam and not the game's exe. Launching a steam game with the steam exe requires the -applaunch switch and the game's app id. The app id can be found by right clicking the game in Steam, going to properties, then the Updates tab. There's probably an easier way though. The other change is that you will need your script to wait for the game to launch before waiting for it to close.
The example is assuming the same paths from thomas's post and that steam is in D:\Steam. You may need to modify accordingly.
I think that using the steam features of Attract Mode is probably a better way to live your life, except I can't find how to configure it. I really find Attract Mode to be insanely annoying to configure.
You'll need to know the name of the game's exe when running. Just open task manager, right click, properties, and it's probably the contents of the text box at the top, plus .exe. The big difference is that you want to launch steam games with steam and not the game's exe. Launching a steam game with the steam exe requires the -applaunch switch and the game's app id. The app id can be found by right clicking the game in Steam, going to properties, then the Updates tab. There's probably an easier way though. The other change is that you will need your script to wait for the game to launch before waiting for it to close.
The example is assuming the same paths from thomas's post and that steam is in D:\Steam. You may need to modify accordingly.
Code:
#include <Constants.au3>
ProcessClose("attract.exe")
FileChangeDir("D:\Steam")
Run("D:\Steam\steam.exe -applaunch 1498570", "", @SW_HIDE)
ProcessWait("KOFXV-Win64-Shipping.exe")
ProcessWaitClose("KOFXV-Win64-Shipping.exe")
FileChangeDir("D:\SYSTEM\AM\")
Run("D:\SYSTEM\AM\attract.exe")
Exit
I think that using the steam features of Attract Mode is probably a better way to live your life, except I can't find how to configure it. I really find Attract Mode to be insanely annoying to configure.