I've been messing around with VT100 escape sequences on Windows 10. I know that this code:
@ECHO OFF
FOR /F %%A in ('ECHO prompt $E^| cmd') DO SET "ESC=%%A"
<NUL SET /P "=%ESC%[4;6HBye"
Will set the cursor position to 4,6 and display "Bye" starting from that position. My question is, is there any way to check what character is on a specific cursor location? As in, if I ask what's on cursor position 4,6, it'll tell me the letter "B"?
I've tried using a for command, kinda like this
FOR /F "delims=" %%A in ('<NUL SET /P "=%ESC%[4;6HBye"') DO (
echo %%A
)
But it doesn't really work. Does anyone have a solution? Thank you.