From 6cb1f48946a7888a2e1ebdcf390fd5f014a5ce74 Mon Sep 17 00:00:00 2001 From: kazhafeizhal <2397633100@qq.com> Date: Sat, 13 Aug 2022 12:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=AB=E9=80=9F=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.ahk | 12 +++++++++++- menu.exe | Bin 1559552 -> 1560064 bytes 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/menu.ahk b/menu.ahk index 86dce80..bae0afd 100644 --- a/menu.ahk +++ b/menu.ahk @@ -97,6 +97,7 @@ global g_hook_command := "" global g_hook_mode := false global g_should_reload := false global g_my_menu_map := {"增加一条命令: " convert_key2str(g_config.key_edit_new) : "edit_new" + , "删除当前命令: delete" : "label_delete" , "编辑当前命令: " convert_key2str(g_config.key_edit_now) : "edit_now" , "编辑全部命令: " convert_key2str(g_config.key_open_editor) : "open_editor" , "发送到窗口: " convert_key2str(g_config.key_send) : "label_send_command" @@ -111,6 +112,7 @@ if !FileExist(A_ScriptDir "\cmd\Menus\超级命令.xml") fileread, xml_file_content,% "*P65001 " A_ScriptDir "\cmd\Menus\超级命令.xml" my_xml.XML.LoadXML(xml_file_content) cmds := xml_parse(my_xml) +my_xml.file := A_ScriptDir "\cmd\Menus\超级命令.xml" ;注册热键 Hotkey,% g_config.key_open_search_box , main_label @@ -259,10 +261,17 @@ return run,% A_ScriptDir "\v1\AutoHotkey.exe " A_ScriptDir "\cmd\menue_create.ahk " my_pid return +~Delete:: +gosub, label_delete +return + label_delete: if(!WinActive("ahk_id " MyGuiHwnd) || g_command == "") return + if(m("无法撤销, 确定删除?","ico:?","btn:ync","def:2")!="Yes") + return + GuiControlGet Command if !Command return @@ -276,10 +285,11 @@ label_delete: node := my_xml.SSN(pattern) if(!Next:=Node.NextSibling?Node.NextSibling:Node.PreviousSibling) Next:=Node.ParentNode - Next.SetAttribute("last",1) + ;Next.SetAttribute("last",1) Node.ParentNode.RemoveChild(Node) my_xml.save(1) Populate() + reload return Populate(SetLast:=0){ diff --git a/menu.exe b/menu.exe index 9fafe9d40f63fd78d93720d8786e80b8e5b0dc98..aeafe066420b73c9f9e32663f1e3cd6f1405925d 100644 GIT binary patch delta 500 zcmZpe5#KN;euE$*y+)9tbfo^fdosYX8N=2*eT|C4&Gfg8`L+RP{1y3eOj=d%A8G#7Xu_I!c+z`Bor0 zsU**;GA|j(N=Z$#GE&l1v{i~sE#7{wT|AF*dPb+XElW;*V#@YKo#JU$OaYGDIgW_` OV4q%aT6_YWkN^Mz&Y_S1 delta 332 zcmZpe6W=f+euE$*Z5ON-|H3m}t3%vp`{54p6h^7kiW0rx)Dp*%lA_F{(vnmSrJTg# b5+xl&&FQLL;`ZCKyTp^NwqH0R{(~I=9OhbT