Closed aaronklaassen closed 7 years ago
This is great! Thanks for changing that stuff, I'm not a fan of that AHK syntax :P
One thing: the templates in "Resources/AHK_templates" is where you should be making the changes. The AHK file in "Options/RunGame.ahk" is the file that the launcher overwrites with the contents of the relevant AHK template each time a game is run so it's a placeholder script.
This still has a bug: idled-out games are left running in the background. The force-quit doesn't work.
⚠️ In progress ⚠️
There were two bugs here:
InitialWait
never worked; the idle timer would be triggered firstidleLimit
ms, waiting for the idle timer to trigger an actual exit and kick us back to the menu.Fixes:
InitialWait
is a label and not a function, execution would continue through there and start the idle timer long before the initialwait timer triggered.global process_pid
inside theKillApp
function; without that, it'd be looking for a localprocess_pid
variable, but there isn't one so it would just use a blank value. By adding theglobal
, we use theprocess_pid
from the outside scope (that gets set withRun
- that should be a reliable way of killing processes).Also added the
WriteLog
function for writing debug messages. You can turn off the actual write by settingdebug
to false on line 7.