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 » Wed Apr 09, 2014 10:03 am

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: 4865
Joined: Sat Jan 05, 2008 4:21 pm

Re: Clean console command.

#2 Post by Administrator » Wed Apr 09, 2014 11:58 am

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 » Wed Apr 09, 2014 1:26 pm

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: 4865
Joined: Sat Jan 05, 2008 4:21 pm

Re: Clean console command.

#4 Post by Administrator » Wed Apr 09, 2014 1:49 pm

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 » Wed Apr 09, 2014 5:43 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest