crashed game clients
Posted: Fri Nov 11, 2011 8:31 pm
Noticed that the bot says "Did not find any crashed game clients".
Just curious, what happens if it finds one?
Just curious, what happens if it finds one?
Code: Select all
function errorCallback(script, line, message)
local crashwin = findWindow("Crash Report", "#32770");
if( crashwin ~= 0 and crashwin ~= nil ) then
-- Looks like the paired game client crashed. Kill it off and exit.
local pid = findProcessByWindow(crashwin);
os.execute("TASKKILL /PID " .. pid .. " /F");
warning(script .. ":" .. line .. ": " .. message);
printf("Found a crashed game client and killed it. (PID %d)\n", pid);
printf("This instance of MicroMacro will automatically terminate in 30 seconds.\n");
printf("Press ENTER to end the script and prevent termination.\n");
local starttime = os.time();
while( os.time() - starttime < 30 ) do
yrest(10);
if( keyPressed(key.VK_ENTER) or keyPressed(key.VK_ESCAPE) ) then
return;
end
end
-- Terminate this copy of MicroMacro.
os.exit();
else
printf("Did not find any crashed game clients.\n");
end
end
atError(errorCallback);
Code: Select all
atError(function() end)
is there any way you could upload this program and post it here or in a pm? because i've been looking all over for something like thatWhiteTiger wrote:Got a program that restarts my bot and rom if it crashes. it would kinda interfere with that.