它利用了 AHK 和 ActiveX 控件来创建一个图形用户界面(GUI),展示了工具的详细信息、使用说明以及相关链接。
Gui用Html做关于页面.ahk
; 原作者:https://github.com/hui-Zz/RunAny Menu_About: aboutWebHeight:=( 96 / A_ScreenDPI ) * 120 + 380 marginTop:=( 96 / A_ScreenDPI ) * 50 Gui,99:Destroy Gui,99:Color,FFFFFF Gui,99:Add, ActiveX, x0 y0 w570 h%aboutWebHeight% voWB, shell explorer oWB.Navigate("about:blank") versionTime:=RegExReplace(RunAny_update_time, "[^\d\.]*([\d\.]+)[^\d\.]*", "$1") versionUrlEncode:=StrReplace(SkSub_UrlEncode("v" RunAny_update_version),"%","`%") vHtml = ( <html> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>name</title> <body style="font-family:Microsoft YaHei;margin:30px;background:url(https://hui-zz.gitee.io/runany/assets/images/RunAnyMp_120x120.png) no-repeat center top;"> <br><br> <h2 align="center" style="margin-top:%marginTop%px;"> 【%RunAnyZz%】一劳永逸的快速启动工具 <br> <img alt="GitHub stars" src="https://raster.shields.io/github/stars/hui-Zz/RunAny.svg?style=social&logo=github"/> <img alt="GitHub forks" src="https://raster.shields.io/github/forks/hui-Zz/RunAny?style=social"/> <img alt="history" src="https://raster.shields.io/badge/2017--2022-white.svg?label=Time&style=social&logo=github"/> </h2> <b>当前版本:</b><img alt="当前版本" style="vertical-align:middle" src="https://raster.shields.io/badge/RunAny-%versionUrlEncode%-blue.svg?style=flat-square"/> <br> <b>最新版本:</b><img alt="GitHub release" style="vertical-align:middle" src="https://raster.shields.io/github/v/release/hui-Zz/RunAny.svg?label=RunAny&style=flat-square&color=red"/> <img alt="Autohotkey" style="vertical-align:middle" src="https://raster.shields.io/badge/autohotkey-1.1.33.10-green.svg?style=flat-square&logo=autohotkey"/> <br> 默认启动菜单热键为 <b><font color="red"><kbd>``</kbd></font></b>(Esc键下方的重音符键~`` ) <br> 注意:想打字打出 <font color="red"><kbd>``</kbd></font> 的时候,按 <font color="red"><kbd>Win</kbd> + <kbd>``</kbd></font> <br><br> <li>按住<kbd>Shift</kbd>+回车键 或+鼠标左键打开 <b>多功能菜单运行方式</b></li> <li>按住<kbd>Ctrl</kbd>+回车键 或+鼠标左键打开 软件所在的目录</li> <li>按住<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+回车键 或+鼠标左键打开 快速跳转到编辑该菜单项</li> <li>按住<kbd>Ctrl</kbd>+<kbd>Win</kbd>+鼠标左键打开 以管理员身份来运行</li> <br> 【右键任务栏RA图标进行设置】 <br><br> 作者:hui-Zz 建议:hui0.0713@gmail.com </body> </html> ) oWB.document.write(vHtml) oWB.Refresh() Gui,99:Font,s11 Bold cRed,Microsoft YaHei Gui,99:Add,Link,xm+18 y+10,赞助支持作者:<a href="https://hui-zz.gitee.io/runany/#/ABOUT">https://hui-zz.gitee.io/runany/#/ABOUT</a> Gui,99:Font,s11 Bold cBlack,Microsoft YaHei Gui,99:Add,Link,xm+18 y+10,国内Gitee文档:<a href="https://hui-zz.gitee.io/RunAny">https://hui-zz.gitee.io/RunAny</a> Gui,99:Add,Link,xm+18 y+10,Github文档:<a href="https://hui-zz.github.io/RunAny">https://hui-zz.github.io/RunAny</a> Gui,99:Add,Link,xm+18 y+10,Github地址:<a href="https://github.com/hui-Zz/RunAny">https://github.com/hui-Zz/RunAny</a> Gui,99:Add,Text,y+10, 讨论QQ群: Gui,99:Add,Link,x+8 yp,<a href="https://jq.qq.com/?_wv=1027&k=445Ug7u">246308937【RunAny快速启动一劳永逸】</a>`n Gui,99:Font Gui,99:Show,AutoSize Center,关于%RunAnyZz% %RunAny_update_version% %RunAny_update_time%%AdminMode% hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND ; OnMessage(0x200,"WM_MOUSEMOVE") return ;[文本转换为URL编码] SkSub_UrlEncode(str, enc="UTF-8") { enc:=trim(enc) If enc= Return str hex := "00", func := "msvcrt\" . (A_IsUnicode ? "swprintf" : "sprintf") VarSetCapacity(buff, size:=StrPut(str, enc)), StrPut(str, &buff, enc) While (code := NumGet(buff, A_Index - 1, "UChar")) && DllCall(func, "Str", hex, "Str", "%%%02X", "UChar", code, "Cdecl") encoded .= hex Return encoded }
声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。
评论(0)