CODE:
#SingleInstance
MyMenu := Menu()
MyMenu.Add "Item 1", MenuHandler
MyMenu.Add "Item 2", MenuHandler
MenuHandler(Item, *) {
ToolTip "You selected " Item
}
#HotIf
;~ #HotIf WinActive("ahk_class SciTEWindow")
F2:: MyMenu.show
if Specify the window to trigger menu.show
-----#HotIf WinActive("ahk_class SciTEWindow")
It will appear when the mouse is clicked outside the menu. The menu will not disappear.
But if it is triggered in a global hotkey, ---#HotIf
This problem will not occur.
What is the reason?
Statistics: Posted by cgx5871 — Today, 09:50