Also tested my script on the steam version and it properly exits the game.
Here is my AHK script that runs the steam version, my monitor is already in portrait so I don't need to hassle with rotating it. Showpicture puts a backglass up for me. This launches the game, sets it to full screen, clicks play, binds the keys, then exits cleanly on escape.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
PPdir = %A_ScriptDir%
IfNotExist, propinball.exe ; If you don't want to put Timeshockstarter.exe in your Pro Pinball Directory you can enter the path to Pro Pinball.exe below
PPdir = C:\pinball\steampinball\SteamApps\common\Pro Pinball Ultra
Run, "ShowPicture.exe" /left=63 /top=-1276 /width=1020 /height=875 /picture=Timeshock.jpg
Run, "%PPdir%\ProPinball.exe", %PPdir%
Process, wait, ProPinball.exe
WinWaitActive, ahk_class Cocos2dxWin32
Send {F11}
sleep 1000
; This is supposed to send a left mouse click to the "Start Simulation" button on the start screen.
; On your system this buttón is propably located on different coordinates then on mine especially if your resolution is not 1920x1080
; You can use Autohotkey's Window Spy to get working coordinates for your system.
MouseClick,left,300,1150
process, WaitClose, ProPinball.exe
Process, Close, ShowPicture.exe
ExitApp
; You can change your key bindings here
#IfWinActive ahk_class Cocos2dxWin32
1::s
Escape::Process, Close, ProPinball.exe
RCtrl::Backspace
LCtrl::LAlt
#IfWinActive