Clear console

69 views
Skip to first unread message

Nico May

unread,
Feb 2, 2016, 9:23:23 PM2/2/16
to Haxe
Hey guys, I've been trying to figure out how to clear the console from haxe and I haven't been able to get it. Tried `new Process('cls', []);` but it fails.

anyone have any ideas?
Thanks :)
Nico

Nico May

unread,
Feb 3, 2016, 12:10:25 AM2/3/16
to Haxe
Just noticed this too:

new Process('cls', null); //fails
untyped __cpp__('system("cls");'); //works

Anyone know how to do this without the magic call?

Nico

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Domagoj Štrekelj

unread,
Feb 3, 2016, 2:10:26 AM2/3/16
to Haxe
Hello,

Have you tried using Sys.command('cls'); without passing the argument array? This works fine on my end. I'm using Haxe 3.2.1.

Nico May

unread,
Feb 3, 2016, 9:59:34 AM2/3/16
to Haxe

Ahhh, I bet that's it, I couldn't find the .command I thought process was the same, thank you! (:

Nico


--

Domagoj Štrekelj

unread,
Feb 3, 2016, 1:07:37 PM2/3/16
to haxe...@googlegroups.com
You're welcome!

Process should create a new thread running the specified process. It had no effect in your case because 'cls' is a console command and not a computer program.

You likely have all this figured out by now. I'm just leaving an explanation in case someone else has a similar "problem" :)

You received this message because you are subscribed to a topic in the Google Groups "Haxe" group.
Reply all
Reply to author
Forward
0 new messages