; gui context menu test ; use AutoHotKey v1.1.24.05 #SingleInstance, Force #InstallMouseHook CoordMode, Mouse, Screen appliname=contextmenu_test wtitle=%appliname% ; set context menu Menu, ctmenu, Add, %wtitle%, SettingsLable Menu, ctmenu, Add, Menu, ctmenu, Add, Settings, SettingsLable Menu, ctmenu, Add, Exit, EXIT ; GUI settings ; Gui, +Owner +AlwaysOnTop -Resize -SysMenu -MinimizeBox -MaximizeBox -Disabled -Caption -Border -ToolWindow Gui, +Owner +AlwaysOnTop +Resize Gui, Color, 336699 Gui, Font, CFFFFFF S24 W700 Q2, Arial Gui, Add, Text, Vkeytext, ...( RButton : ContextMenu ) Gui, Show, NoActivate, %wtitle% ; GuiControl, , keytext, Alt+Q : Exit ; WinSet, Transparent, 200, %wtitle% Loop { Sleep, 16 } EXIT: GuiClose: ExitApp GuiContextMenu: Menu, ctmenu, Show, %A_GuiX%, %A_GuiY% Return SettingsLable: MsgBox, Settings Return ~!Q Up:: ; Alt+Q ... Exit Goto, EXIT