Autohotkey 自动热键标签在Windows Server 2008上导致内存泄漏崩溃

Autohotkey 自动热键标签在Windows Server 2008上导致内存泄漏崩溃,autohotkey,Autohotkey,下面的代码在Windows Vista和Windows 7上运行得很好,但当我尝试在Windows Server 2008 R2上运行它时,它会在我的系统托盘中不断生成越来越多的相同脚本的实例,直到AutoHotKey最终锁定了我的整个系统。似乎AutoHotKey的“标签”功能是罪魁祸首。有人知道解决方法吗 phpDoc: SendInput <{?}php{Enter}{Enter}{?}>{Enter} SendInput {Up 2} return html5: SendI

下面的代码在Windows Vista和Windows 7上运行得很好,但当我尝试在Windows Server 2008 R2上运行它时,它会在我的系统托盘中不断生成越来越多的相同脚本的实例,直到AutoHotKey最终锁定了我的整个系统。似乎AutoHotKey的“标签”功能是罪魁祸首。有人知道解决方法吗

phpDoc:
SendInput <{?}php{Enter}{Enter}{?}>{Enter}
SendInput {Up 2}
return

html5:
SendInput <{!}doctype html>{enter}
SendInput <html>{enter}
SendInput <head>{enter}
SendInput <title></title>{enter}
SendInput <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">{enter}
SendInput <meta http-equiv="Pragma" content="no-cache">{enter}
SendInput <meta http-equiv="Cache-Control" content="no-cache">{enter}
SendInput <meta name="Expires" content="Mon, 01 Jan 2000 00:00:01 GMT ">{enter}
SendInput <link rel="stylesheet" type="text/css" href="/styles.css">{enter}
SendInput </head>{enter}
SendInput <body>{enter}
SendInput </body>{enter}
SendInput </html>{enter}
SendInput {up 2}
SendInput {end}
return

showMainMenus()
{
    Menu, MySubMenu, add, &1 - PHP, phpDoc
    Menu, MySubMenu, add, &2 - HTML 5, html5
    Menu, MyMenu, add, &1 - Boilerplate Text, :MySubMenu
}

;;;; KEY BINDINGS

!/::
showMainMenus()
return
phpDoc:
SendInput{Enter}
SendInput{Up 2}
返回
html5:
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{up 2}
SendInput{end}
返回
showmain菜单()
{
菜单,MySubMenu,add,&1-PHP,phpDoc
菜单,我的子菜单,添加和2-html5,html5
菜单,MyMenu,add,&1-样板文本:MySubMenu
}
;;;; 密钥绑定
!/::
showmain菜单()
返回
使用,忽略


将使旧实例保持运行,并阻止启动同一脚本的新实例。

我稍微重写了一下。据我所知,您首先定义菜单结构,然后显示菜单。另外,由于在
phpDoc:
之前没有
返回,因此脚本的这一部分在启动时立即执行

#SingleInstance, Ignore

;;;; DEFINE MENUS
Menu, MySubMenu, add, &1 - PHP, phpDoc
Menu, MySubMenu, add, &2 - HTML 5, html5

;;;; LAUNCH MENU
!/::Menu, MySubMenu, Show

return ; To prevent phpDoc from executing on startup

phpDoc:
SendInput <{?}php{Enter}{Enter}{?}>{Enter}
SendInput {Up 2}
Return

html5:
SendInput <{!}doctype html>{enter}
SendInput <html>{enter}
SendInput <head>{enter}
SendInput <title></title>{enter}
SendInput <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">{enter}
SendInput <meta http-equiv="Pragma" content="no-cache">{enter}
SendInput <meta http-equiv="Cache-Control" content="no-cache">{enter}
SendInput <meta name="Expires" content="Mon, 01 Jan 2000 00:00:01 GMT ">{enter}
SendInput <link rel="stylesheet" type="text/css" href="/styles.css">{enter}
SendInput </head>{enter}
SendInput <body>{enter}
SendInput </body>{enter}
SendInput </html>{enter}
SendInput {up 2}
SendInput {end}
return
#单实例,忽略
;;;; 定义菜单
菜单,MySubMenu,add,&1-PHP,phpDoc
菜单,我的子菜单,添加和2-html5,html5
;;;; 启动菜单
!/::菜单,我的子菜单,显示
返回;防止phpDoc在启动时执行
phpDoc:
SendInput{Enter}
SendInput{Up 2}
返回
html5:
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{enter}
SendInput{up 2}
SendInput{end}
返回

显然我还没有提升这些帖子所需的15个声望,否则我会提升这两个帖子的声望。谢谢你们两位!罗伯特·伊尔布林克,你的实现就像一个魔咒!