[关闭]
@woshichuanqilz 2015-12-11T09:30:05.000000Z 字数 1066 阅读 4669

Win10中设置Cmd窗口的字体和窗口大小

AHK Windows


起因:

从Win7 升级到Win7之前的Cmd窗口中的字体修改和窗口大小的修改不是那么好用了。

解决方案

好了这里给出我的可以使用的版本, 具体查找相关资料的过程就不在赘述了。

设置窗口大小

我是用AHK的快捷键启动的Cmd窗口, 用WinMove完成我的功能。

  1. #c::
  2. {
  3. SetTitleMatchMode, RegEx
  4. WindowTitlePath:="C:\\Windows\\system32\\cmd.exe"
  5. WindowTitle := WindowTitlePath
  6. IfWinNotExist, %WindowTitle%
  7. {
  8. run "C:\Windows\system32\cmd.exe"
  9. WinWaitActive, %WindowTitle%, , 2
  10. WinMove, %windowtitle%,,,,1140,800
  11. WinGetPos,,, Width, Height, %WindowTitle%
  12. WinMove, %WindowTitle%,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
  13. }
  14. return
  15. }

设置字体, 使用的是一个注册表文件, 这个在Win7上就是有效的。

  1. Windows Registry Editor Version 5.00
  2. [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe]
  3. "WindowSize"=dword:00170058
  4. "ScreenBufferSize"=dword:01900119
  5. "WindowPosition"=dword:0079004b
  6. "ColorTable01"=dword:00235600
  7. "FontSize"=dword:00150000
  8. "FontWeight"=dword:00000190
  9. "FaceName"="Consolas"
  10. "FontFamily"=dword:00000036

把上面的代码保存成.reg文件然后运行就好了。

相关资料连接

Stupid Geek Tricks: Enable More Fonts for the Windows Command Prompt
Modify cmd.exe properties using the command prompt

Tnx for reading?
: )

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注