Even if there was a way to make sure that it is a Runes of Magic crash, you still need to know which game client crashed if you have more than one running, wouldn't you? Isn't there any way to see what process opened the crash window? That's what you need to know which game crashed.
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
I had a bit of a look at the process functions and it looks like it would work.
During the "selectGame()" function it gets the 'process' but eventually discards it. Couldn't it save it then when checking if the game has crashed do something like;
Oh, hmm, that would prevent windowValid() from working, then. Does spy++ or Winspector have a function to check for parents? If so, that could be used.
That's it! Seems like the parent window handle is, in fact, the client's window that has crashed. I'll just have to add a function to MicroMacro to make use of this.
Go ahead and give the attached executable a try. The function is getWindowParent(). It returns nil if it does not have a parent or some error occured.
local crashReport = findWindow("Crash Report", "#32770"); -- Something crashed
local crashedClientWin = getWindowParent(crashReport);
if( crashedClientWin == getWin() ) then
-- The client we are controlling crashed; do something
end