I thougt to remember that in RoM bot in the console was a output that just modified the last printed line without scrolling. I want that to do too. I want to update the last output line in the console window. How can I do that. I have tried to experiment with the cli.getAttributes() but without success.
Any other way to set back the cursor for one line? Or to reprint the whole content of the console window and modify the last line?
How to set cursor position in MM console window
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.
How to set cursor position in MM console window
The RoM Bot Online Wiki needs your help!
Re: How to set cursor position in MM console window
You can't go beck a line but you can go to the beginning of the current line using \r, eg.
Code: Select all
for i = 1, 10 do
print("\r"..i)
yrest(1000)
end
- 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: How to set cursor position in MM console window
You are my king! Where do you find that special codes? Is it lua knowledge?rock5 wrote:You can't go beck a line but you can go to the beginning of the current line using \r, eg.Code: Select all
for i = 1, 10 do print("\r"..i) yrest(1000) end
The RoM Bot Online Wiki needs your help!
Re: How to set cursor position in MM console window
Escape characters such as \r, \n, \t etc. can be used in many languages, so no, it's not an lua thing.
- 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: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: How to set cursor position in MM console window
If you are using Ncurses mode, you can use ncurses.move() to move the (virtual) cursor within a 'window' to change the position of output. Just set it wherever you need and overwrite the line with a new ncurses.print().
Who is online
Users browsing this forum: No registered users and 4 guests