Update wow watchdog

This commit is contained in:
Gregory Lirent 2024-08-04 23:04:26 +03:00
parent 25af70f24f
commit d5a334ec42
Signed by: lirent
GPG Key ID: F616BE337EFFEE77

View File

@ -1,7 +1,15 @@
$WATCHDOG=0
for (;;) { for (;;) {
$NRESP = Get-Process | Where-Object {$_.mainWindowTitle} | Where -Property MainWindowTitle -eq "World of Warcraft" | Where -Property Responding -eq $false $NRESP = Get-Process | Where-Object {$_.mainWindowTitle} | Where -Property MainWindowTitle -eq "World of Warcraft" | Where -Property Responding -eq $false
if ($NRESP) { if ($NRESP) {
$WATCHDOG += 1
} else {
$WATCHDOG = 0
}
if ($WATCHDOG -ge 5) {
Stop-Process -InputObject $NRESP Stop-Process -InputObject $NRESP
} }