There is this useful yet annoying feature on windows command prompt called quick edit mode. Useful because it lets a user cut and paste off the command prompt. Annoying because it causes a running process to hang in select mode (that is an unsuspecting ignorant user clicking once in the command prompt window by mistake). This feature is on by default in our working environment. I am looking for a way to turn this off while a user runs my perl scripts, to prevent him from hanging the running script. One of the ways suggested to me by someone here was to use a sparsely documented win32 perl module called Win32::Console. I have found very few examples on the use of this module. Below is a snippet of the perl code that I am trying to turn quick edit mode off with:
The above code fails for me with the die message. Any further help would be greatly appreciated. I am also open to any other ideas which might bypass using win32::console module.