fbpx
维基百科

AutoHotkey

AutoHotkey自由开源的編程語言,常用於Windows平台的自動化。[3]

AutoHotkey
開發者Chris Mallett(Chris),Steve Gray(Lexikos)
初始版本2003年11月10日 (2003-11-10)
目前版本
  • 2.0.2 (2023年1月2日)[1]
源代码库
  • github.com/Lexikos/AutoHotkey_L
编程语言C++
操作系统Microsoft Windows
语言英语
类型脚本语言自动化GUI
许可协议GPL
网站www.autohotkey.com

AutoHotkey 能快速編寫的功能

  • 启动程序,打開文件
  • 獲得或產生系統狀態,音量(狀態,調節),搜索螢幕上的图像或像素(獲得坐標),鼠標(位置,懸停視窗對象,移動),鍵盤(热键(快捷鍵),热字串(鍵盤輸入序列),上下文热键),游戏杆按鈕
  • 创建图形用户界面
  • 剪貼簿操作,程序窗口操作

历史

AutoHotkey Basic时期,官方网站为www.autohotkey.com(页面存档备份,存于互联网档案馆)。当Chris Mallett(原作者)停止更新时宣布AutoHotkey_L为后续主分支。[4]不久网站转由polyethene管理,他对网站的决定与论坛中许多核心用户出现较大分歧[5][6]且不时失去联系并成立了公司确保其正常运营。[7][8][9]2014年4月成立了 AutoHotkey Foundation 以確保AutoHotkey自由开放、持续开发,並提供组织、法务和财政上的支持。[10]

版本歷史

  • AutoHotkey Basic:Chris Mallett 提议在AutoIt v2中集成热键支持未得到AutoIt社区响应后,于2003年11月10日公开发布了AutoHotkey的首个测试版本。[11][12][13]作者以AutoIt v2的语法为基础并在一些命令和编译器中使用AutoIt v3的源码开始编写自己的程序。[14]随后,AutoIt v3的许可从GPL切换为闭源,作者给出的原因是“某些项目重复窃取AutoIt的代码”和“建立了竞争者”。[15]
  • AutoHotkey_L:2010年10月10日,原作者在停止更新一年多后表示“失去了兴趣”并声明AutoHotkey_L为正在开发的分支,并把它放置在网页的下载部分的前面。[16]同时把原来的版本称为 AutoHotkey Basic。[17]比起AutoHotkey Basic,AutoHotkey_L中增加了UnicodeCOM对象调试特性和其他功能。[18]

主要分支

  • AutoHotkey 1.0.* - 被稱為 AutoHotkey Basic 或者 AutoHotkey Classic 或者 AutoHotkey Vanilla[19]
  • AutoHotkey_H[20] 是由 HotkeyIt 合并了原有AutoHotkey.dll 並在 AutoHotkey_L 及 AutoHotkey v2 的基础上开发的分支。
  • AutoHotkey_L 主要由 Lexikos 在 AutoHotkey Basic 基础上开发的分支[18],但是現在已經變成(也被稱為) AutoHotkey 1.1.*(页面存档备份,存于互联网档案馆) 的主要版本。[19]
  • AutoHotkey v2[21] 由 Lexikos 基于AutoHotkey_L代码开发,已于2022年12月20日正式发布,語法不完全兼容 AutoHotkey_1.1.*。[22][23]

應該選擇哪個版本

AutoHotkey 1.0.* 和 AutoHotkey_H 已停止開發和維護,不建議使用。

依賴大量舊的代碼庫建議使用 AutoHotkey 1.1.*,因為目前絕大多數的代碼和社區都是使用這個版本,這個版本仍在維護,仍然會添加少量的新功能和修復錯誤,用戶可以等待遷移工具完善或者 v2 變成主流再遷移即可。

不依賴舊的代碼庫,願意且能夠同步改動代碼的用戶使用 AutoHotkey v2,能獲得更一致的語法和更多的新功能。另外从v2 beta 4版本开始,v2和v1.1可以在同一台电脑上共存,v2 beta 15 已能自動從代碼來決定以哪個版本的引擎來運行,也有提供安裝工具,無需手動編譯或設定。

常用的辅助工具

  • 中文和英文文檔[24][25]
  • Window Spy(自帶):獲得當前窗口或控件的進程的接口細節。
  • ahk2exe(Convert .ahk to .exe)(自帶):脚本编译器,把 ahk 脚本转换成可执行文件。
  • SciTE4AutoHotkey (页面存档备份,存于互联网档案馆):基于 SciTE 的代碼编辑器,功能包含语法高亮、自动补全、一鍵運行腳本、GUI 工具等。
  • GUI Creator[26]:在图形界面中为AutoHotkey脚本创建GUI的工具。
  • Pulover's Macro Creator[27]:圖形化宏录制工具和自动化工具。
  • iWB2 Learner[28]:从IE中获取网页元素信息的工具,编写COM自动化操作IE的工具。
  • VSCode 上的相關插件:提供語法高亮,文檔格式化等功能。

代碼範例

快捷鍵(熱鍵)

讓左邊的   Win键失效

LWin::Return 

搜索剪貼簿的內容

Alt & g::Run http://www.google.com/search?q=%clipboard% 

热字串(序列键)[29]範例:依次按下wjbk 輸入维基百科

::wjbk::维基百科,自由的百科全书 

按下rn 打開記事本

::rn::Run, Notepad 

另请参阅

参考资料

  1. ^ Release 2.0.2. 2023年1月2日 [2023年1月6日]. 
  2. ^ 2.0 2.1 . ahkscript.org. [2019-11-24]. (原始内容存档于2019-03-14). 
  3. ^ Prevent RSI with AutoHotkey. cedeq.com. [2014-03-02]. (原始内容于2014-03-02). 
  4. ^ Chris. My status and website changes. AutoHotkey.com. [2014-06-15]. (原始内容于2014-10-09). 
  5. ^ polyethene. Changes for AutoHotkey website. AutoHotkey.com. [2014-06-15]. (原始内容于2014-10-09). 
  6. ^ sumon. Make AHK_L "main" version?. AutoHotkey.com. [2014-06-15]. (原始内容于2014-07-14). 
  7. ^ tidbit. Basics as to why AHKSCRIPT exists. ahkscript.com. [2014-06-15]. (原始内容于2014-07-27). 
  8. ^ The AutoHotkey Foundation. ahkscript.org. [2014-06-15]. (原始内容于2014-06-25). 
  9. ^ tank. Welcome and if you need help. ahkscript.org. [2014-06-15]. (原始内容于2014-07-14). 
  10. ^ The AutoHotkey Foundation. ahkscript.org. [2014-06-29]. (原始内容于2014-06-25). 
  11. ^ Author Chris Mallett's post on the AutoHotkey Forums. Autohotkey.com. [2011-12-02]. (原始内容于2008-02-18). 
  12. ^ . Paperlined.org. [2011-12-02]. (原始内容存档于2011-12-08). 
  13. ^ . Autohotkey.com. [2011-12-02]. (原始内容存档于2011-11-04). 
  14. ^ . Autohotkey.com. [2011-12-02]. (原始内容存档于2008-05-26). 
  15. ^ . Autoitscript.com. [2011-12-02]. (原始内容存档于2019-09-19). 
  16. ^ . Autohotkey.com. [2011-12-02]. (原始内容存档于2019-09-19). 
  17. ^ Download page showing AutoHotkey_L as ongoing platform. Autohotkey.com. [2011-12-02]. (原始内容于2011-12-01). 
  18. ^ 18.0 18.1 AutoHotkey_L的新增特性. ahkcn.sourceforge.net. [2011-12-28]. (原始内容于2014-10-09). 
  19. ^ 19.0 19.1 AutoHotkey Downloads. (原始内容于2020-07-02). 
  20. ^ HotKeyIt. AutoHotkey_H. autohotkey.net. [2014-06-16]. 
  21. ^ AutoHotkey v2. ahkscript.org. [2014-06-15]. (原始内容于2014-07-09). 
  22. ^ AutoHotkey v2 Development. ahkscript.org. [2014-06-15]. (原始内容于2014-07-14). 
  23. ^ v2-changes. www.autohotkey.com. [2020-08-19]. (原始内容于2020-04-09). 
  24. ^ ahk 英文文檔. (原始内容于2019-10-01). 
  25. ^ ahk 中文文檔. (原始内容于2019-10-13). 
  26. ^ maestrith. GUI Creator. ahkscript.org. [2014-06-16]. (原始内容于2014-06-25). 
  27. ^ Pulover's Macro Creator. macrocreator.com. [2014-04-08]. (原始内容于2014-04-08). 
  28. ^ iWB2 Learner页面. [2014-04-22]. (原始内容于2014-04-18). 
  29. ^ 热字串和自动替换. AutoHotkey中文帮助. ahkcn.sf.net. [2014-06-16]. (原始内容于2014-06-03). 

外部链接

autohotkey, 本條目存在以下問題, 請協助改善本條目或在討論頁針對議題發表看法, 此條目包含指南或教學內容, 2016年5月14日, 請藉由移除或重寫指南段落來改善條目, 或在討論頁提出討論, 此條目可能包含原创研究或未查证内容, 2016年5月14日, 请协助補充参考资料以改善这篇条目, 详细情况请参见讨论页, 此條目應避免有陳列雜項, 瑣碎資料的部分, 2016年5月14日, 請協助將有關資料重新編排成連貫性的文章, 安置於適當章節或條目內, 是自由开源的編程語言, 常用於windows平台的自動化,. 本條目存在以下問題 請協助改善本條目或在討論頁針對議題發表看法 此條目包含指南或教學內容 2016年5月14日 請藉由移除或重寫指南段落來改善條目 或在討論頁提出討論 此條目可能包含原创研究或未查证内容 2016年5月14日 请协助補充参考资料以改善这篇条目 详细情况请参见讨论页 此條目應避免有陳列雜項 瑣碎資料的部分 2016年5月14日 請協助將有關資料重新編排成連貫性的文章 安置於適當章節或條目內 AutoHotkey是自由开源的編程語言 常用於Windows平台的自動化 3 AutoHotkey開發者Chris Mallett Chris Steve Gray Lexikos 初始版本2003年11月10日 2003 11 10 目前版本2 0 2 2023年1月2日 1 源代码库github wbr com wbr Lexikos wbr AutoHotkey wbr L编程语言C 操作系统Microsoft Windows语言英语类型脚本语言自动化GUI许可协议GPL网站www wbr autohotkey wbr com 目录 1 AutoHotkey 能快速編寫的功能 2 历史 3 版本歷史 4 主要分支 5 應該選擇哪個版本 6 常用的辅助工具 7 代碼範例 8 另请参阅 9 参考资料 10 外部链接AutoHotkey 能快速編寫的功能 编辑启动程序 打開文件 獲得或產生系統狀態 音量 狀態 調節 搜索螢幕上的图像或像素 獲得坐標 鼠標 位置 懸停視窗對象 移動 鍵盤 热键 快捷鍵 热字串 鍵盤輸入序列 上下文热键 游戏杆按鈕 创建图形用户界面 剪貼簿操作 程序窗口操作历史 编辑AutoHotkey Basic时期 官方网站为www autohotkey com 页面存档备份 存于互联网档案馆 当Chris Mallett 原作者 停止更新时宣布AutoHotkey L为后续主分支 4 不久网站转由polyethene管理 他对网站的决定与论坛中许多核心用户出现较大分歧 5 6 且不时失去联系并成立了公司确保其正常运营 7 8 9 2014年4月成立了 AutoHotkey Foundation 以確保AutoHotkey自由开放 持续开发 並提供组织 法务和财政上的支持 10 版本歷史 编辑AutoHotkey Basic Chris Mallett 提议在AutoIt v2中集成热键支持未得到AutoIt社区响应后 于2003年11月10日公开发布了AutoHotkey的首个测试版本 11 12 13 作者以AutoIt v2的语法为基础并在一些命令和编译器中使用AutoIt v3的源码开始编写自己的程序 14 随后 AutoIt v3的许可从GPL切换为闭源 作者给出的原因是 某些项目重复窃取AutoIt的代码 和 建立了竞争者 15 AutoHotkey L 2010年10月10日 原作者在停止更新一年多后表示 失去了兴趣 并声明AutoHotkey L为正在开发的分支 并把它放置在网页的下载部分的前面 16 同时把原来的版本称为 AutoHotkey Basic 17 比起AutoHotkey Basic AutoHotkey L中增加了Unicode COM 对象 调试特性和其他功能 18 主要分支 编辑AutoHotkey 1 0 被稱為 AutoHotkey Basic 或者 AutoHotkey Classic 或者 AutoHotkey Vanilla 19 AutoHotkey H 20 是由 HotkeyIt 合并了原有AutoHotkey dll 並在 AutoHotkey L 及 AutoHotkey v2 的基础上开发的分支 AutoHotkey L 主要由 Lexikos 在 AutoHotkey Basic 基础上开发的分支 18 但是現在已經變成 也被稱為 AutoHotkey 1 1 页面存档备份 存于互联网档案馆 的主要版本 19 AutoHotkey v2 21 由 Lexikos 基于AutoHotkey L代码开发 已于2022年12月20日正式发布 語法不完全兼容 AutoHotkey 1 1 22 23 應該選擇哪個版本 编辑AutoHotkey 1 0 和 AutoHotkey H 已停止開發和維護 不建議使用 依賴大量舊的代碼庫建議使用 AutoHotkey 1 1 因為目前絕大多數的代碼和社區都是使用這個版本 這個版本仍在維護 仍然會添加少量的新功能和修復錯誤 用戶可以等待遷移工具完善或者 v2 變成主流再遷移即可 不依賴舊的代碼庫 願意且能夠同步改動代碼的用戶使用 AutoHotkey v2 能獲得更一致的語法和更多的新功能 另外从v2 beta 4版本开始 v2和v1 1可以在同一台电脑上共存 v2 beta 15 已能自動從代碼來決定以哪個版本的引擎來運行 也有提供安裝工具 無需手動編譯或設定 常用的辅助工具 编辑中文和英文文檔 24 25 Window Spy 自帶 獲得當前窗口或控件的進程的接口細節 ahk2exe Convert ahk to exe 自帶 脚本编译器 把 ahk 脚本转换成可执行文件 SciTE4AutoHotkey 页面存档备份 存于互联网档案馆 基于 SciTE 的代碼编辑器 功能包含语法高亮 自动补全 一鍵運行腳本 GUI 工具等 GUI Creator 26 在图形界面中为AutoHotkey脚本创建GUI的工具 Pulover s Macro Creator 27 圖形化宏录制工具和自动化工具 iWB2 Learner 28 从IE中获取网页元素信息的工具 编写COM自动化操作IE的工具 VSCode 上的相關插件 提供語法高亮 文檔格式化等功能 代碼範例 编辑快捷鍵 熱鍵 讓左邊的 Win键失效 LWin Return 搜索剪貼簿的內容 Alt amp g Run http www google com search q clipboard 热字串 序列键 29 範例 依次按下wjbk 輸入维基百科 wjbk 维基百科 自由的百科全书 按下rn 打開記事本 rn Run Notepad另请参阅 编辑 自由软件主题 SciTE4AutoHotkey 页面存档备份 存于互联网档案馆 AutoIt AutoKey 用于Linux Automator 用于Macintosh Bookmarklet 用于Firefox的iMacros参考资料 编辑 Release 2 0 2 2023年1月2日 2023年1月6日 2 0 2 1 AutoHotkey Downloads ahkscript org 2019 11 24 原始内容存档于2019 03 14 Prevent RSI with AutoHotkey cedeq com 2014 03 02 原始内容存档于2014 03 02 Chris My status and website changes AutoHotkey com 2014 06 15 原始内容存档于2014 10 09 polyethene Changes for AutoHotkey website AutoHotkey com 2014 06 15 原始内容存档于2014 10 09 sumon Make AHK L main version AutoHotkey com 2014 06 15 原始内容存档于2014 07 14 tidbit Basics as to why AHKSCRIPT exists ahkscript com 2014 06 15 原始内容存档于2014 07 27 The AutoHotkey Foundation ahkscript org 2014 06 15 原始内容存档于2014 06 25 tank Welcome and if you need help ahkscript org 2014 06 15 原始内容存档于2014 07 14 The AutoHotkey Foundation ahkscript org 2014 06 29 原始内容存档于2014 06 25 Author Chris Mallett s post on the AutoHotkey Forums Autohotkey com 2011 12 02 原始内容存档于2008 02 18 An AutoIt AutoHotkey nonfunctional comparison Paperlined org 2011 12 02 原始内容存档于2011 12 08 AutoHotkey Changelog for Years 2003 2004 Autohotkey com 2011 12 02 原始内容存档于2011 11 04 Author Chris Mallett s post on the AutoHotkey Forums Autohotkey com 2011 12 02 原始内容存档于2008 05 26 Licensing Opinions AutoIt Forums Autoitscript com 2011 12 02 原始内容存档于2019 09 19 Forum post by Chris announcing AutoHotkey L now main platform Autohotkey com 2011 12 02 原始内容存档于2019 09 19 Download page showing AutoHotkey L as ongoing platform Autohotkey com 2011 12 02 原始内容存档于2011 12 01 18 0 18 1 AutoHotkey L的新增特性 ahkcn sourceforge net 2011 12 28 原始内容存档于2014 10 09 19 0 19 1 AutoHotkey Downloads 原始内容存档于2020 07 02 HotKeyIt AutoHotkey H autohotkey net 2014 06 16 AutoHotkey v2 ahkscript org 2014 06 15 原始内容存档于2014 07 09 AutoHotkey v2 Development ahkscript org 2014 06 15 原始内容存档于2014 07 14 v2 changes www autohotkey com 2020 08 19 原始内容存档于2020 04 09 ahk 英文文檔 原始内容存档于2019 10 01 ahk 中文文檔 原始内容存档于2019 10 13 maestrith GUI Creator ahkscript org 2014 06 16 原始内容存档于2014 06 25 Pulover s Macro Creator macrocreator com 2014 04 08 原始内容存档于2014 04 08 iWB2 Learner页面 2014 04 22 原始内容存档于2014 04 18 热字串和自动替换 AutoHotkey中文帮助 ahkcn sf net 2014 06 16 原始内容存档于2014 06 03 外部链接 编辑官方論壇 页面存档备份 存于互联网档案馆 官方论坛中文子版 页面存档备份 存于互联网档案馆 初学者嚮導 页面存档备份 存于互联网档案馆 英文文檔 页面存档备份 存于互联网档案馆 中文文檔 页面存档备份 存于互联网档案馆 awesome AutoHotkey AutoHotkey 相關項目 页面存档备份 存于互联网档案馆 取自 https zh wikipedia org w index php title AutoHotkey amp oldid 75235329, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。