Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: b.grigorev on July 14, 2017, 04:08:47 AM
-
Hello!
Is it possible to set up so that after a certain long time there was an exit from the game in the general list of games.
-
Like if you are playing a game, pause it and after a while the game just exit? i dont think so, but maybe im wrong.
-
Yes exactly.
By the principle of demonstration rollers that turn on after a while.
-
@b.grigorev
within AM, I don't know.
with an external script (like autoit) on windows:
#include <Timers.au3>
;idle time in seconds
$time=10
While 1
If _Timer_GetIdleTime() >= 1 * $time * 1000 Then
;systems in taskmanager
ProcessClose("zsnesw.exe")
ProcessClose("mame64.exe")
ProcessClose("notepad.exe")
EndIf
WEnd
Open taskmanager > start your emulator > check process name > add the process name in sourcecode
script waits specified seconds and close all enclosed process
-
@b.grigorev
within AM, I don't know.
with an external script (like autoit) on windows:
#include <Timers.au3>
;idle time in seconds
$time=10
While 1
If _Timer_GetIdleTime() >= 1 * $time * 1000 Then
;systems in taskmanager
ProcessClose("zsnesw.exe")
ProcessClose("mame64.exe")
ProcessClose("notepad.exe")
EndIf
WEnd
Open taskmanager > start your emulator > check process name > add the process name in sourcecode
script waits specified seconds and close all enclosed process
There seems to be an issue with this script thats effecting my slower machine 1.7Ghz Celeron, its pulling 100%, but on my 1.7Ghz Pentium it doesn't cause any issues! ???
This is what I use...using the above script as reference and guidance...
#include <Timers.au3>
;idle time in seconds
$time=120
While 1
If _Timer_GetIdleTime() >= 1 * $time * 1000 Then
;systems in taskmanager
ProcessClose("mame32p.exe")
EndIf
WEnd
-
Okay, problem fixed
Ill post the code when this forum will allow me to, I keep getting "Internal Server Error"
there we go... I'll just post a picture then...If I cant post the code
-
Seems it doesn't work right if your inputs are made by a gamepad