#NoEnv #SingleInstance Force SetWorkingDir %A_ScriptDir% SetBatchLines -1 ListLines Off #Include#Include Gui, +Resize box1 := new GuiBox("w300 h100" , "Blue" , "5" , [10,3] , "AutoHotkey" , "bold s30") box2 := new GuiBox("x110 w200 h30", "Green", "2" , 1 , "http://ahkscript.org", "cRed s12") box3 := new GuiBox("xm w300 h60", "0xF39B23", "3", [20,2,1,1,1,1] ) Gui, Add, Button, xp+10 yp+10 w85 h40, 隐藏 Gui, Add, Button, x+10 wp hp , 显示 Gui, Add, Button, x+10 wp hp , 修改 box4 := new GuiBox("xm w300 h30", "Gray", "1", 0, "调整下窗口大小试试" ) Gui, Show,, 添加方框到界面 Return Button显示: box1.Show() Return Button隐藏: box1.Hide() Return Button修改: box2.Modify("x10 w300", "Gray", "2", 0, "http://ahkscript.com", "c0x45AFEF") Return GuiSize: box1.AutoSize("w") box2.AutoSize("x") box4.AutoSize("wy") Return GuiClose: ExitApp