6)打开刚才创建的文本文档,复制输入以下代码,然后在“文件”菜单里面选择“另存为”,在文档名字那儿属于4K.ahk,点击保存类型右边的黑色倒三角箭头,选择“所有文件”,最后点“保存”,就是这样一个叫4K.ahk文件就创建好了。文件图标是白色的,在这个文件夹上鼠标右击,点“属性”可以看到文件的信息。删除原来的名字叫4K1的文本文档,为了防止误删,在文件上鼠标右击,把文件类型那儿写着TXT文件的删除。
F12::
WinGet, TempWindowID, ID, A
If (WindowID != TempWindowID)
{
WindowID:=TempWindowID
WindowState:=0
}
If (WindowState != 1)
{
WinGetPos, WinPosX, WinPosY, WindowWidth, WindowHeight, ahk_id %WindowID%
WinSet, Style, ^0xC40000, ahk_id %WindowID%
WinMove, ahk_id %WindowID%, , 0, 0, 3840, 2160
}
Else
{
WinSet, Style, ^0xC40000, ahk_id %WindowID%
WinMove, ahk_id %WindowID%, , WinPosX, WinPosY, WindowWidth, WindowHeight
}
WindowState:=!WindowState
return



