MM Window Closes Automatically
Forum rules
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
MM Window Closes Automatically
First, want to say I did a forum search for "closes" and then searched text for "mm". I'm hunting for an answer to why the MM window would close by itself. I understand I get various errors which may result in the client crashing but shouldn't the MM window remain open? It would be so much easier to pick up where things left off if the mm window remained open. Usually it does remain open but more often lately the MM window closes by itself. Thanks for any thoughts on the topic.
I'm using MM for rombot... the rom script.
I'm using MM for rombot... the rom script.
- Administrator
- Site Admin
- Posts: 5329
- Joined: Sat Jan 05, 2008 4:21 pm
Re: MM Window Closes Automatically
It shouldn't be closing by itself, no. It could be crashing, but I doubt it. Chances are, it is part of the auto logout script or something along those lines that causes it to exit. I think rock5 or lisa would probably know more about this than myself.
Re: MM Window Closes Automatically
I couldn't find anything in default bot that would close a MM window, there is for closing the game window but not MM window.
I think Rock did work on that sort of thing in his login userfunction, I guess it is possible something in there is doing it but yeah I couldn't find anything in default bot to close MM so I would say there is something in a userfunction causing it.
I think Rock did work on that sort of thing in his login userfunction, I guess it is possible something in there is doing it but yeah I couldn't find anything in default bot to close MM so I would say there is something in a userfunction causing it.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: MM Window Closes Automatically
It is set up so that when the client crashes and the bot detects it, it terminates the client then shuts down micromacro. I don't know why it does this. It's been this way since Nov 2011 when Administrator added it. I agree with you, micromacro should remain open. I seem to remember bringing it up once but I also couldn't find the post. If it's up to me I would change it so it doesn't close micromacro.
- 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.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: MM Window Closes Automatically
Hmm never had that happen with a crash, u can insta crash game easy.
Just make a macro using
Just tested it then and it is still trying to kill the same mob constantly even though the game crashed and has the crash report window.
It eventually got to 11 unstick tries and closed game successfully.
Could just be timing of the crash I guess.
Just make a macro using
Code: Select all
/script GetCraftItem(5,6,177)
It eventually got to 11 unstick tries and closed game successfully.
Code: Select all
Clearing target.
Unstick tries 11 greater then maximum allowed unstick tries 10.
07/09/13 15:37:55 Auto-logging out.
SUCCESS: The process with PID 4388 has been terminated.
Runes of Magic process successfully closed.
Did not find any crashed game clients.
3:37pm - Exiting: Auto-logout
Dumping profile data
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: MM Window Closes Automatically
That output didn't detect a crash. When it does you would get a messages like this.
Instead of
It's in the errorCallback function. Line 338 in functions.lua.
Code: Select all
Found a crashed game client and killed it. (PID %d)
This instance of MicroMacro will automatically terminate in 30 seconds.
Press ENTER to end the script and prevent termination.
Code: Select all
Did not find any crashed game clients
- 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.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: MM Window Closes Automatically
I see what the problem is. For that code to be triggered the client needs to crash and the bot needs to error. Unfortunately the bot doesn't always error. Maybe there should be a check for client crash during the regular bot loop. Or maybe just a crash check added to the unstick functions.
BTW you can simulate the error by doing what you did Lisa (start a waypoint such as rbassist and enter "/script GetCraftItem(5,6,177)") then pressing ctrl-l to terminate the script. Then the client will close and you will get those error messages and MM will also close after 30s.
BTW you can simulate the error by doing what you did Lisa (start a waypoint such as rbassist and enter "/script GetCraftItem(5,6,177)") then pressing ctrl-l to terminate the script. Then the client will close and you will get those error messages and MM will also close after 30s.
- 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.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Administrator
- Site Admin
- Posts: 5329
- Joined: Sat Jan 05, 2008 4:21 pm
Re: MM Window Closes Automatically
I wouldn't be opposed to disabling it (I think it is just a call to os.exit()?). If I remember correctly, that was a feature you guys had requested.
Re: MM Window Closes Automatically
How about the idea of checking for crashed clients during unsticks. I don't think unsticks will always close the client, maybe only if CLOSE_WHEN_STUCK is true, but I think it should always terminate the client if a crash is detected. I was thinking maybe make a function that checks if the client crashed and closes it, then call that in errorCallback and when unsticking. I don't like that it doesn't check if the attached client is the crashed one so I'd probably add a getWindowParent in there too.
- 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.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Administrator
- Site Admin
- Posts: 5329
- Joined: Sat Jan 05, 2008 4:21 pm
Re: MM Window Closes Automatically
Sounds fine to me. I think the issue with detecting crashed clients was that sometimes the window would freeze for about 30 seconds before it actually crashed. MicroMacro would notice the unresponsiveness and check for the crash before it actually happened. Not sure what to do about that. I guess you can continue to keep checking for some time before eventually giving up (if no crash is detected).
Re: MM Window Closes Automatically
Hey there.. just wanted to pop in here and say thanks for discussing this. I think I'm at about 70% understanding level LOL. So I'll continue to watch and maybe learn a little. Looking forward to seeing how this develops.
Take care!
Take care!
Re: MM Window Closes Automatically
Ah so you are saying that the bot might error before the crash report appears? I'm not sure what we could do about that unless we could find another crashing indicator. I don't think we can just wait an arbitrary amount of time because a character could end up dying. How about the ping rate? I've noticed sometimes that when the client is about to crash the ping rate goes through the roof. Of course the client might be crashing because it has lost communication with the server, hence the high ping. If it is crashing for some other reason the ping may not go up. But then again maybe those times that take 30s to crash are always about communication.Administrator wrote: I think the issue with detecting crashed clients was that sometimes the window would freeze for about 30 seconds before it actually crashed. MicroMacro would notice the unresponsiveness and check for the crash before it actually happened. Not sure what to do about that.
- 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.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: MM Window Closes Automatically
I've been working on this. I created the function which I called 'isClientCrashed'. Used it in the error callback. I tried it in the unstick but I noticed that when I crashed the client it was easy to end up trying to repeat a task that never stops. So I put the crash check at the top of the main bot loop and it seem to work fine. Seems like whatever it's doing as soon as you crash the client it closes. I'm just wondering though, whether doing a findWindowsList every bot loop would be ok. It seems to take between 2-3ms on my system.
- 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.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Administrator
- Site Admin
- Posts: 5329
- Joined: Sat Jan 05, 2008 4:21 pm
Re: MM Window Closes Automatically
It should be acceptable, but you might be able to get it to only check once every 10th loop or something if it becomes a problem.
Who is online
Users browsing this forum: No registered users and 1 guest