3 ms·
I used to think the unix way of doing this was overly baroque, till I had to figure out how a terminal emulator worked in Windows, which requires an actual inst
by simplicio 4y ago
I used to think the unix way of doing this was overly baroque, till I had to figure out how a terminal emulator worked in Windows, which requires an actual instance of the windows default terminal program (con.exe I think?) be drawn on the screen. So if you want to grab the IO from a terminal program (say to make your own terminal emulator), the standard solution is to draw a windows terminal off the boundry of your monitor somewhere and scrape the text out and send it to your program.*
*(I think this situation has improved somewhat in recent years with Windows Console?, but I haven't had a chance to play with that yet).