News for hackers. Stuff that matters.
Re:Solving the Worst Problem in Programming Education: Windows by dgan on Friday July 12, 2024 @08:06PM (#40950588)
Somehow tangent: can anyone tell me why WhY i can't just copy the text in any Windows' error windows? It looks like it's all text somehow is a texture which is un-selectable? So i have to retype manually (and translate back to English) the error messages to look them up
Re:Solving the Worst Problem in Programming Education: Windows by hal009 on Friday July 12, 2024 @08:15PM (#40950638)
No need to retype manually. If you upload a screenshot of the error to ChatGPT, it will transcribe it for you and even give you some hints on how to resolve it.
Re:Solving the Worst Problem in Programming Education: Windows by dmz73 on Friday July 12, 2024 @08:14PM (#40950631)
Have you tried? CTRL+C on most dialogs will copy all of the text to clipboard. Of course, there are 3rd party dialogs that are not standard Windows dialogs and they do not implement this functionality.
Re:Solving the Worst Problem in Programming Education: Windows by magicalhippo on Saturday July 13, 2024 @05:32AM (#40952880)
To be fair, it's quite a hidden feature. I've used Windows as a daily driver since 3.1 days, and I didn't discover this until late Windows XP or early Windows 7 days.
Re:Solving the Worst Problem in Programming Education: Windows by oefrha on Saturday July 13, 2024 @05:42AM (#40952912)
Not dialogs, but you certainly can’t copy errors/warnings from Visual Studio inline popups, which is super annoying when I occasionally develop a Windows app in Visual Studio.
Re:Solving the Worst Problem in Programming Education: Windows by dgan on Friday July 19, 2024 @07:14AM (#41005006)
So literally today i tried to install sql server developer edition, and for some reason the downloaded file was corrupted. The error msg wasn't "ctrl-c"-able, so i had to retype whatever nonsense shown on the screen.

That was Microsoft's database, from Microsoft's website, to be installed on a Microsoft's OS.

Re:Solving the Worst Problem in Programming Education: Windows by duncans on Friday July 12, 2024 @08:15PM (#40950636)
CTRL-C will copy the entire text to the clipboard for standard message boxes.
Re:Solving the Worst Problem in Programming Education: Windows by BMc2020 on Friday July 12, 2024 @08:22PM (#40950678)
Maddening isn't it? One work around is to install MS Powertoys, then Win Shift T will give you a rectangle to capture text from anywhere on the screen, including an image then it will convert it and put it in the clipboard for you. Not perfect, it tends to confuse Capital O with the number 0, but it's better than nothing.

The why part is harder. My theory is Windows is made of many shells of of code, and they older parts of the system will never be refactored. I think someone counted 5 different gui interfaces in Win 11.

To be fair, MS is handcuffed by backwards compatibility. So interfaces remain frozen in time because changing anything can break compatibility in ways impossible to predict.

Fun Fact: File Explorer can keep changing because they never promised anyone they would keep it compatible with anything.

Edit: Just to say I did comment on the linked article, I never dreamed I would ever read the words "use PowerShell to create a nice GUI".

Re:Solving the Worst Problem in Programming Education: Windows by hu3 on Friday July 12, 2024 @08:29PM (#40950724)
No workaround needed. CTRL+C will copy the text.
Re:Solving the Worst Problem in Programming Education: Windows by BMc2020 on Friday July 12, 2024 @09:22PM (#40951006)
Sometimes. (Excel is a famous example).
Re:Solving the Worst Problem in Programming Education: Windows by xnx on Friday July 12, 2024 @08:27PM (#40950709)
https://learn.microsoft.com/en-us/windows/powertoys/text-ext... will OCR/copy any text in a region of the screen you select
Re:Solving the Worst Problem in Programming Education: Windows by mattigames on Friday July 12, 2024 @08:30PM (#40950732)
Yeah its maddening, its also an ubiquitous problem, in Android sometimes I need to copy a file name from the Google photos app, surprise surprise: Tapping the file name does nothing, the quick dirty solution its to screenshot it, use Google lens on such screenshot and from there I can select the text.
Re:Solving the Worst Problem in Programming Education: Windows by djeikyb on Friday July 12, 2024 @08:32PM (#40950747)
There's a bunch of different UI frameworks, but WPF is pretty popular, and in WPF, my understanding is the normal control you'd use to just slap text on the screen is TextBlock. And a WPF TextBlock doesn't have any way to make the text selectable. And if text isn't selectable, you don't get the normal affordances of the window manager's copy functions.

I've used Avalonia, which is based on WPF. Its TextBlock control works the same way, which means the default way to put text on the screen is inaccessible. But if the programmer is thinking about it, they could use SelectableTextBlock instead, and then the text is available to the user for selecting and copying.