I have a script that does a multitude of actions, with lots of echoes. When clicking into the CMD prompt, mark mode is activated and the script is blocked from writing to the terminal until I exit mark mode or perform any actions that would otherwise disable mark mode (like right-click).
There are several non-programmatic solutions to this problem involving disabling quick edit mode for the CMD.
:test
echo %0
goto test
Clicking into the CMD while this is executing will cause the output to stop, whilst right-clicking within the window (or otherwise unmarking the selection) will cause the output to continue.
However, I would like to avoid/workaround this issue entirely via my script, so I do not need to modify the functionality of my CMD otherwise.
How can I write to the console, and ensure my program will continue regardless of marking inside the console?
Can I direct my output to the window in a way that marking/making a selection in the window will not block STDOUT? Ideally the echo will function while the console is marked.
I've seen someone direct their echo to > nul, but that seems to be preventing writing to the console entirely and does not solve the root of the issue.