Questions tagged [windows-console]

Windows character mode applications using the functions provided by the console I/O functions. This tag should be used by questions about the console functions, structures and winevents, which support character mode applications.

614 questions
3
votes
1 answer

Keep .NET console application alive until the termination sequence finishes

I am working on a data acquisition application and I want to ensure that it exits gracefully. That is, it processes all the already collected data, flushes all the (file) buffers to "disk" (persistent memory) and might even uploads the data to the…
Cerike
  • 354
  • 1
  • 15
3
votes
2 answers

C# Nancy.Hosting.Self doesn't answer to requests from network, only to localhost request

I am trying to integrate nancy self hosting into my wpf project and when I start my program, I am able to connect to rest api from local browser, but cannot connect from another computer. HostConfiguration hostConfigs = new…
user4729289
3
votes
2 answers

Windows console "ESC[2J" doesn't really "clear" the screen

I know this kind of questions are asked frequently, but I think this one is a little different and needed to be asked. The new Windows console supports ANSI (VT100) control codes: ANSI/VT100 control codes & Windows document: the control…
Kirk
  • 446
  • 4
  • 18
3
votes
1 answer

How to implement sound in a C# Console Application correctly?

I have created a console application that creates text anywhere in the console screen. I wanted to create a typewriter like effect, so i imported a keystroke sound from a typewriter and used it in my project. It was very hard to sync the sound to…
Erick Ramirez
  • 157
  • 1
  • 3
  • 9
3
votes
1 answer

How to disable user selection in Windows console

I need to disable user mouse selection in the Windows console. Is it possible and how? I tried the function SetConsoleMode() to disable mouse input with it, but it did not work as I expected. Selecting was still possible.
seqedugi
  • 57
  • 2
  • 7
3
votes
1 answer

Ctrl+Z behaviour in terminal

string s; while(getline(cin,s)){ cout << "---" << endl for(auto c: s) cout << int(c) << endl; } cout << "Exiting"; If my input is Ctrl+Z, then I press enter once, and my program exits immediately. ^Z Exiting If I enter a character…
Silversonic
  • 1,289
  • 2
  • 11
  • 26
3
votes
0 answers

Is it possible to use the system console to display output?

I'd like to have IntelliJ display output via the standard output streams in the native system console (in this case, the Windows console) rather than in the integrated IDE tab. Is there any way I can do this without having to manually run my app via…
Pavan P
  • 645
  • 8
  • 17
3
votes
0 answers

batch script randomly pauses until key pressed

We use a batch file as a deployment script for installation of software in a new system. Quite often the batch script will randomly pause until a keypress is present (i.e. the console window is active and a physical key is pressed). I'm just…
3
votes
1 answer

subprocess.Popen creationflags

I want to spawn a subprocess, and it would be good if everything would happen in the background without opening a new Windows console. First I thought that something is wrong with my code, because it lead to errors while sending input to the…
martinenzinger
  • 2,166
  • 2
  • 17
  • 20
3
votes
2 answers

How can I access command prompt history with Python

On Windows 10, Python 3.6 Let's say I have a command prompt session open (not Python command prompt or Python interactive session) and I've been setting up an environment with a lot of configurations or something of that nature. Is there any way for…
Jonathan Porter
  • 1,365
  • 7
  • 34
  • 62
3
votes
1 answer

ANSI color Set Graphics Rendition breaking mid-batch and working after it proceeds

I've got a batch that has a sub-section which iterates through lines of a file for EXEs to try running, and then the batch sorts the EXEs based on their exit codes. For some reason, the ANSI SGR seems to break or echo the literal text after setting…
kayleeFrye_onDeck
  • 6,648
  • 5
  • 69
  • 80
3
votes
1 answer

Suppress subprocess console output in a python windowed (Tkinter) app

I am attempting to run the following code in a python app executable made using pyinstaller -w -F script.py : def ffmpeg_command(sec): cmd1 = ['ffmpeg',…
3
votes
1 answer

On Windows, what is the python launcher 'py' doing that lets control-C cross between process groups?

Right, this is extremely obscure... So on Windows, when you hit control-C to interrupt a console program, this sends a CTRL_C_EVENT to the process. You can also do this manually via GenerateConsoleCtrlEvent. In Python, os.kill acts as a wrapper…
Nathaniel J. Smith
  • 11,613
  • 4
  • 41
  • 49
3
votes
1 answer

Hiding the console window after reading input

I have a script that has a GUI, which takes user data and stores it into a text file. It runs another script (an .exe), which waits for user input and then does some work. What I want is for the latter script to hide its console window after reading…
GLHF
  • 3,835
  • 10
  • 38
  • 83
3
votes
1 answer

Cygwin isn't using the version of PHP i'd expect it to

For a number of reasons (laziness among them), I have a few different versions of php installed on my computer. If I do php -v in my Windows Console, it shows the version of php I'd expect. However, if I do php -v in my Cygwin terminal, I get a…
spuppett
  • 547
  • 10
  • 26