--[[ RoM Client Crash Monitor Keep watch for the RoM client Crash window and terminate when detected --]] function main() setWindowName(getHwnd(), "Client Crash Monitor") cprintf(cli.yellow, "Starting client process monitor\n") repeat local win = findWindow("Crash Report", "#32770") if( win > 0 ) then local pid = findProcessByWindow(win) printf("Found process %d, window [%s/%s]\n", pid, getWindowName(win), getWindowClassName(win)) os.execute("TASKKILL /PID " .. pid .. " /F") end yrest(secondsToTimer(5)) until false end startMacro(main, true)