Configs/Windows/Scripts/LeftToRightMouseClick.ahk
2023-12-12 18:06:52 +01:00

28 lines
611 B
AutoHotkey
Executable File

#Requires AutoHotkey v2.0
Persistent
; <https://www.autohotkey.com/boards/viewtopic.php?t=38761>
HotKey("LButton", LeftClickActions)
LeftClickActions(key)
{
Send "{Click Right}"
InfoTooltip(false)
HotKey("LButton", "Off")
}
HotKey("LButton", "Off")
OnMessage(0x404, AHK_NOTIFYICON)
AHK_NOTIFYICON(wParam, lParam, uMsg, hWnd)
{
if (lParam = 0x201) ; WM_LBUTTONDOWN
{
HotKey("LButton", "On")
InfoTooltip(true)
}
}
InfoTooltip(status)
{
ToolTip (status ? "Right click action is temporarily active." : "Right cick action is now disabled.")
SetTimer () => ToolTip(), -1000
}