首先下载并安装AutoHotkey Installer及SmartGUI Creator
然后用SmartGUI Creator进行表格设计,再存为.ahk程序,
最后双击即可运行,而如果以文本方式打开则可以研究其代码。
贴一段最简单的程序以及截图:
Gui, Add, Text, x17 y8 w120 h20, Your Name:
Gui, Add, Text, x17 y38 w120 h20, Your Year of bIrth (yyyy):
Gui, Add, Edit, x157 y8 w100 h20 vName, Name
Gui, Add, Edit, x157 y38 w100 h20 vYear, yyyy
Gui, Add, Button, x27 y68 w70 h20, OK
Gui, Add, Button, x177 y68 w70 h20, Cancel
Gui, Show, x279 y217 h98 w277, Generated using SmartGUI Creator
Return
ButtonCancel:
GuiClose:
ExitApp
ButtonOk:
Gui, submit
Age = %a_yEar% ;%a_year% holds the current year
Age -= %Year% ; %year% holds the year submitted by user
Msgbox, Hey %name%! You're %Age% years old now!
截图:

