Page 1 of 1
Pls help with a macro
Posted: Tue Apr 05, 2011 5:25 am
by schwarzepeter
somtimes wile boting it open the main menü but only somtimes and so its open the bot cant sell items with my addon wile bush the addon butom so i want make a macro that check if main menü open press esc or close main menü idk the comands for that pls help

hope u understand wat i meen my english is not so good

Re: Pls help with a macro
Posted: Tue Apr 05, 2011 8:34 am
by rock5
A bit of code I added awhile ago to help the bot recover if you leave an edit box open in the game was causing some problems but was mostly fixed in rev 581. But it looks like I didn't completly fix it. There is still a problem if you change character
and get a timeout in the RoMScript function.
Here's a better solution that should completely fix the problem. The game menu wont be left open and it will be able to reset the editbox focus problem when changing characters.
Could you please test it as I don't get timouts so can't fully test it.
Around line 576 in functions.lua please change this;
Code: Select all
if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) == 0 then
keyboardPress(settings.hotkeys.ESCAPE.key);
end
to this
Code: Select all
if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) == 0 then
keyboardPress(settings.hotkeys.ESCAPE.key); yrest(200)
if RoMScript("GameMenuFrame:IsVisible()") then
-- Clear the game menu and reset editbox focus
keyboardPress(settings.hotkeys.ESCAPE.key); yrest(200)
RoMScript("GetKeyboardFocus():ClearFocus()")
end
end
Let me know if this solves it and I'll commit it.
Re: Pls help with a macro
Posted: Wed Apr 06, 2011 6:59 pm
by rock5
I went ahead and added this fix to rev 592.
It shouldn't leave the game menu open anymore.
Re: Pls help with a macro
Posted: Thu Apr 07, 2011 12:29 am
by schwarzepeter
big thx rock5 works great now ^^ only i think a game fail that game somtimes crashes at laod/portscreen