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
5
votes
0 answers

How to get GenerateConsoleCtrlEvent to work with cmd.exe

I'm trying to get GenerateConsoleCtrlEvent to work. This is the minimal example I've come up with: #include static BOOL WINAPI handler(DWORD CtrlType) { return TRUE; } int main() { if (!SetConsoleCtrlHandler(&handler, TRUE)) …
Kevin Smyth
  • 1,892
  • 21
  • 22
5
votes
2 answers

CreateProcess does not create additional console windows under Windows 7?

I am trying to run a process using CreateProcess(...) and run it independently in a seperate console window. I can achieve this using the system("...") function, but I prefer CreateProcess since it gives me the possibility to specify environment and…
André Aichert
  • 313
  • 2
  • 11
4
votes
1 answer

Python script pops up console when run by scheduler

Possible Duplicate: Run python script without DOS shell appearing I have a python script that Windows Scheduler runs every 5 minutes for me. The script works fine but every time it runs it's loading up the console really quick on my desktop…
Splashlin
  • 7,225
  • 12
  • 46
  • 50
4
votes
3 answers

How to get rid of "Command Line" window when running Python script with GUI?

Possible Duplicate: How can I hide the console window in a PyQt app running on Windows? I am programming under Python2.6 + PyQT + Eric4 environment. All the GUI and Program parts are done, but here is the problem. When I run my program, two…
Mars_Taxi
  • 61
  • 1
  • 5
4
votes
2 answers

Can you redirect Tee-Object to standard out?

I am writing a script and I want to pass the values but also see them displayed Get-Content data.txt | Tee-Object | data_processor.exe But Tee-Object always requests a file and I just want to see it on the screen.
Sled
  • 18,541
  • 27
  • 119
  • 168
4
votes
1 answer

How to prevent enter key on windows console from automatically scrolling

Whenever I type some characters into the windows console and hit enter, it automatically scrolls to the next line. Is there any way to disable this behavior in C++ (using the Windows API), and if so; how?
invertedPanda
  • 142
  • 1
  • 7
4
votes
1 answer

Where does execution stop if keyboard interrupt is given as input?

I have this simple piece of code in a file named printftest.c. #include int main(){ int c, i; i = 0; while ((c = getchar()) != EOF) ++i; printf("c = %d\n", c); printf("i = %d\n", i); } Compilation and…
BramAppel
  • 1,346
  • 1
  • 9
  • 21
4
votes
1 answer

How to skip error found in a batch-file and continue executing the command line?

I'm using the Windows Command Processor, (cmd.exe), to scan all the files in a server. My goal is to have a .txt file with name files and where they are located, (for a faster search). This is my code: P: DIR *.* /P /Q /S >…
4
votes
3 answers

Windows 'dir' command: sort files by date when '/s' is specified

Goal: I want to copy the latest file with a certain extension from a "source directory" to a "destination directory" using a batch file. The latest file may be under several sub-directories within the source directory. This question/answer is…
alexleen
  • 125
  • 1
  • 2
  • 8
4
votes
1 answer

TypeError: Cannot read property 'isMultiple' of undefined (using sendgrid, over nodejs on windows console)

I have been trying to send emails through sendgrid with nodeJs on the windows console. I tried to install it using the sendgrid tutorial : echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env echo "sendgrid.env" >> .gitignore source…
4
votes
1 answer

How can I ENABLE_VIRTUAL_TERMINAL_PROCESSING?

Some time ago I noticed that there's a new console mode ENABLE_VIRTUAL_TERMINAL_PROCESSING and I decided to try it out. Here's my sample code: // File: test1.c #include #include #include #include const…
iBug
  • 35,554
  • 7
  • 89
  • 134
4
votes
2 answers

embed cmd in win32 application and text not selectable

I write both gui and console program. For console I use color output like \33[0m. For gui I need to write more code, if I switch to another gui library I need to rewrite the code. Some simple library(I'm currently using) doesn't even have api…
aj3423
  • 2,003
  • 3
  • 32
  • 70
4
votes
2 answers

Python script doesn't print output in command prompt

I need some advice with a Python script. I'm still new and learned it by myself. I found the script on Google. After I retype it, it doesn't print the result in the console. How can the result of the script be shown in the console? Details as…
Ajinata
  • 41
  • 1
  • 1
  • 3
4
votes
1 answer

How to execute a cygwin command from C# and leave it open?

I'm trying to run a cygwin command via bash from C# and try to keep the results open with the read command. My code appears to be opening the bash then immediately closing. What am I doing wrong? static void Main(string[] args) { Process…
winry
  • 311
  • 2
  • 10
4
votes
4 answers

Cannot get STD handle to AllocConsole

I've been trying to get the output handle to my console, but it doesn't seem to work. I got it to set the color of my text, but it's not changing. HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hOut, 0x0A) I tried to debug…
SoLux
  • 162
  • 1
  • 9