Using MM to clean memory

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
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.
Post Reply
Message
Author
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Using MM to clean memory

#1 Post by noobbotter » Thu Jun 25, 2015 11:24 am

Hi guys. On my computer, when playing Runes of Magic, to try to reduce crashes, I run CleanMem. I don't know that the version I have does auto cleaning so every so often I will right-click on my CleanMem Mini-Monitor and select "Clean Memory" and it seems to reduce the amount of memory being used.

So I was wondering if there is a way using LUA in MM to do that exact thing... click on my CleanMem mini-monitor and select "clean memory"?

Or if anyone has a better memory cleaning/optimization program/trick they use, that would be great too. Thanks.

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Using MM to clean memory

#2 Post by BlubBlab » Thu Jun 25, 2015 11:43 am

I think you should read this first :
http://www.howtogeek.com/171424/why-mem ... n-useless/
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Using MM to clean memory

#3 Post by Administrator » Thu Jun 25, 2015 12:01 pm

The best way of handling it, if you feel it is necessary, would be if you can call it by command-line. I believe the function to run a CLI command is (for MM2) system.exec() or (for MM1) system(). Alternatively, you can do it using plain Lua by using the os.execute() function.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Using MM to clean memory

#4 Post by rock5 » Fri Jun 26, 2015 1:14 am

I used to run it with Windows Task Scheduler. I don't remember exactly how I had it set up but probably I had a batch file to run it and called the batch file in the task scheduler.
  • 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

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Using MM to clean memory

#5 Post by noobbotter » Fri Jun 26, 2015 7:22 am

Well, I actually figured it out and it wasn't too difficult, at least with the way I did it. I did figure out that I can set up a hotkey on my MemClean program to initiate a quick clean of memory. Oncy I did that (I set mine up as {CTRL+O}) I wrote a little vbs script as such:

Code: Select all

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "^(%o)"
I put the .vbs file (named testmem.vbs) in the rom folder. Then in my waypoint file when I want it to clean memory (such as after dailies and before I launch minigames because of all the ports to move around, and once after each minigame) I run the command os.execute("cscript scripts/rom/testmem.vbs")

The only issue I found is that the game sees the "o" key press and it opens the friends list window (because that's what the game is supposed to do when i press "o") so if I just follow it up with RoMScript("CloseAllWindows()") I should be good to go. My script ran through all 9 of my characters last night without issue.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests