[Gambas-user] Clean new console by code

Benoît Minisini gambas at ...1...
Sat Jun 25 15:48:21 CEST 2016


Le 25/06/2016 14:52, Gianluigi a écrit :
> Hi Vuott,
> thank you for the answer.
> It deletes only on the second click and the window does not appear that
> remains behind the IDE.
> Changing your code as follows, it deletes immediately, but the window
> remains behind the IDE.
>

You should never use Desktop.SendKeys(). Besides being a dirty hack, it 
will be impossible to do that with coming Wayland.

To clear a console, you must print the according VT100 sequences. Of 
course, it assumes that your terminal is VT100 compatible, but as soon 
as you don't use your code on true old terminals, it should be ok.

The sequence is "\e[2J".

Regards,

-- 
Benoît Minisini




More information about the User mailing list