AutoHotkey系列教程 中级教程(六节三十六课) 第一小节:站在巨人的肩膀上 第二课:轩辕剑
;~ 作 者: 河许人 ;~ 脚本说明: Scite操作示例 ;~ 环境 版本: Autohotkey v1.1.23.03 ;~ MsgBox,hello world! ;~ 消息箱 ;~ MsgBox, 0, , hello world!! ;~ MsgBox, 8228, 问答, 你吃没吃饭? ;~ Gui, Add, DateTime, x130 y110 w130 h40, ;~ Gui, Add, MonthCal, x100 y220 w290 h200, ;~ Gui, Add, Button, x140 y40 w100 h50, Button ;~ ; Generated using SmartGuiXP Creator mod 4.3.29.0 ;~ Gui, Show, Center w476 h400, New GUI Window ;~ Return ;~ GuiClose: ;~ ExitApp ;~ Gui, Add, DateTime, x130 y110 w130 h40, ;~ Gui, Add, MonthCal, x100 y220 w290 h200, ;~ Gui, Add, Button, x140 y40 w100 h50, Button ;~ ; Generated using SmartGuiXP Creator mod 4.3.29.0 ;~ Gui, Show, Center w476 h400, New GUI Window ;~ Return ;~ GuiClose: ;~ ExitApp ;~ ControlGetFocus, fControl, A ;~ Loop 2 ;
课程简介
本节为《AutoHotkey系列教程·中级教程》“站在巨人的肩膀上”小节第二课“轩辕剑”,主题为 SciTE 编辑器下的 AHK 操作示例。教程演示了在 AutoHotkey v1.1.23.03 环境中,如何结合 SciTE 编辑器编写和调试脚本,主要覆盖以下要点:
- 消息框(MsgBox):不同图标/按钮样式组合(如 0、8228 等选项值)的写法,以及如何携带窗口标题与内容文本。
- GUI 窗口创建:使用 Gui Add 添加日期时间控件(DateTime)、月历控件(MonthCal)、按钮(Button)并设置坐标与尺寸,配合 SmartGuiXP Creator 生成布局。
- 窗口事件:GuiClose 回调与 ExitApp 退出程序的配套写法。
- 控件焦点与循环:ControlGetFocus 获取当前激活控件、配合循环遍历控件的常见调试思路。
本例代码以注释形式完整给出,读者可直接在 SciTE 编辑器中运行验证,体会 GUI 布局与消息交互的基本流程。


大佬牛逼,学习学习
求下载连接。。
https://www.autoahk.com/archives/29179
[…] 之前我还出了一篇简单的使用教程,希望能帮你:[GUI]轩辕剑之Scite操作示例 […]