Just one second after the last try the audio device is reactivated, so I will modify the retry intervals.
Ok, cool! Thank you! Do you have an idea how to solve the other issue?
Just one second after the last try the audio device is reactivated, so I will modify the retry intervals.
#SingleInstance force
#NoTrayIcon
Sleep 900000 ; Run this process for 15 minutes then stop
ExitApp
#SingleInstance force
#persistent
#notrayicon
SetWorkingDir %A_ScriptDir%
Process, Exist, DONT_SLEEP.EXE
ProcessExist = %ErrorLevel%
if !(ProcessExist)
Run, DONT_SLEEP.EXE ; Don't Let PS++ sleep
SetTimer, CheckIdle, 60000 ; Check idle every 1 minute
Return
CheckIdle:
if (A_TimeIdle > 900000) ; 15 minutes idle
{
Process, Close, DONT_SLEEP.EXE ; Let PS++ sleep
Return
}
Process, Exist, DONT_SLEEP.EXE
ProcessExist = %ErrorLevel%
if !(ProcessExist)
Run, DONT_SLEEP.EXE ; Don't Let PS++ sleep
Return