Jump to content
Au3Builder

Simple way to clear screen in console application?

Recommended Posts

Au3Builder

I built a console application with Autoit3. i don't know if it's proper way to make console apps... but the method i use apparently works.

 

Source of my app.

#Region
#AutoIt3Wrapper_Change2CUI=y
#EndRegion

ConsoleWrite("Test app")

While 1

Sleep(10)

WEnd

code spoiler is not working for me... (can a moderator correct my post?)

Here is how i execute my app from CMD.

 

START "Autoit - console app" "console.exe"

 

Now I would like to perform CLS  (clear screen) but no idea comes to my mind.Will you help me?

Edited by Au3Builder

Share this post


Link to post
Share on other sites
Au3Builder
11 hours ago, Deye said:

Have you tried

RunWait(@ComSpec & " /C  CLS", "", @SW_HIDE)

 

Thanks.This is exactly what i was looking for.

btw. Would you mind explaining the difference between /C and /K is? I don't think it's mentioned in Autoit documentation.

Edited by Au3Builder

Share this post


Link to post
Share on other sites
Jos
13 minutes ago, Au3Builder said:

I don't think it's mentioned in Autoit documentation

Why would it need to be? it is a parameter of CMD.exe : https://technet.microsoft.com/en-us/library/bb490880.aspx

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×