gpt4 book ai didi

batch-file - 如何从批处理文件更改字体大小?

转载 作者:行者123 更新时间:2023-12-04 08:19:52 26 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Specify the size of command prompt when executing a batch file

(2 个回答)



How to make the console font bigger when running a batch?

(1 个回答)



Find Font size of an active console Window

(2 个回答)



Batch file to maximize current window

(3 个回答)


8 个月前关闭。




我有一个这样的批处理文件:

@echo off
cls
echo Hello Everyone
pause > nul
exit
现在我想要这个 Hello Everyone以特定的字体大小。任何人都可以帮助我如何使用批处理命令而不是更改 CMD 属性来实现。

最佳答案

我希望这会有所帮助,只需确保我在下面编写的代码的顶部存在且未被删除:

@echo off
setlocal enabledelayedexpansion enableextensions
set "cmd.con=HKCU\Console\%%SystemRoot%%_system32_cmd.exe /v"
set "ram=!tmp!\WRAM.tmp"
del "%tmp%\_$xy.bat">nul 2>&1
if [%1]==[ok] goto:init
Reg export HKCU\Console Backup.reg>nul
Reg delete HKCU\Console\%%SystemRoot%%_system32_cmd.exe /f>nul
for %%a in (
"FaceName /t REG_SZ /d "Terminal" /f"
"FontFamily /t REG_DWORD /d 48 /f"
"FontSize /t REG_DWORD /d 1024294 /f"
"FontWeight /t REG_DWORD /d 700 /f"
"ScreenBufferSize /t REG_DWORD /d 13107280 /f"
"CursorSize /t REG_DWORD /d 0 /f"
) do (
set "param=%%a"
set "param=!param:~1!"
set "param=%cmd.con% !param:~0,-1!"
Reg Add !param! >nul
)
start /high cmd /q /k "%~0" ok
for %%a in (
"FaceName /f"
"FontFamily /f"
"FontSize /f"
"FontWeight /f"
"CursorSize /f"
) do (
set "param=%%a"
set "param=!param:~1!"
set "param=%cmd.con% !param:~0,-1!"
Reg Delete !param! >nul
)

rem Enter all of the code you want to output with the formatting, now all the text to be outputted from this batch file will be of the same font, but not the default terminal settings one.

cls
echo Hello Everyone
pause > nul
exit

关于batch-file - 如何从批处理文件更改字体大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65547467/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com