•
Is there any possible way to do this?
• Update •
::来自@Daniel R Livingston
的回答
在第一篇文章中解决了未成年人适应的情况:::
“首先,打印转义码
\e[?25l
将隐藏你的光标。
\e[?25h
将重新启用它。“
write (*,*)char(27)//char(91)//char(63)//char(50)//char(53)//char(108)
! for some reason, by using the 'result = systemqq'
! may force the screen to "apply" the line above, only
! after this, that escape gone works in Windows!
result = systemqq('@cls &@%windir%'//char(92)//'system32'//char(92)//'chcp.exe 850 2>nul >nul 1<&2&@color 0a')
write (*,*)char(27)//'[37;41;4m'//char(255)//char(250)//char(255)//'Generating',x,' Random Numbers!',char(27)
&//'[0m'//char(10)//char(10)
! Obs.: --------------------------------------------------------------------
! Turn the cursor back by adding:
! write (*,*),char(27)//'[?25h' before end program (latest line)
! \e[?25l == char(27)//char(91)//char(63)//char(50)//char(53)//char(108)
两种方法可以做到这一点。
首先,打印转义码\e[?25l
将隐藏光标。 \e[?25h
将重新启用它。
其次,通过调用Windows API:
BOOL WINAPI SetConsoleCursorInfo(
_In_ HANDLE hConsoleOutput,
_In_ const CONSOLE_CURSOR_INFO *lpConsoleCursorInfo
);