Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v2) • About menu()

$
0
0

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?
2.gif

Statistics: Posted by cgx5871 — Today, 09:50



Viewing all articles
Browse latest Browse all 579

Trending Articles