Clean console command.

You may request or share scripts for MicroMacro in this forum.
Post Reply
Message
Author
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Clean console command.

#1 Post by Lamkefyned »

Good afternoon

I wanted to ask if there is any command to clear the console and how to use it in a script of rombot?
If you think something is right just because everyone else believes,you're not thinking.
User avatar
Administrator
Site Admin
Posts: 5340
Joined: Sat Jan 05, 2008 4:21 pm

Re: Clean console command.

#2 Post by Administrator »

Code: Select all

clearScreen()
Will clear the screen of all input.


At the script prompt, you can enter "clear" to clear the screen:

Code: Select all

Script> clear
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: Clean console command.

#3 Post by Lamkefyned »

Hello, good evening

I have an error when making clearScreen()
Error.jpg
If you think something is right just because everyone else believes,you're not thinking.
User avatar
Administrator
Site Admin
Posts: 5340
Joined: Sat Jan 05, 2008 4:21 pm

Re: Clean console command.

#4 Post by Administrator »

I see. Try this:

Code: Select all

function _clear()
	local _, _, x, y = getConsoleAttributes();
	for j = 1, y do
		printf(string.rep(' ', x));
	end
	clearScreen();
end
Then clear the screen by using _clear().
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: Clean console command.

#5 Post by Lamkefyned »

Thank you it worked
If you think something is right just because everyone else believes,you're not thinking.
Post Reply