Code: Select all
#Persistent
#SingleInstance Force
OnExit, UnHook
hHookMouse := DllCall("SetWindowsHookEx", "int", 14, "Uint", RegisterCallback("Mouse", "Fast"), "Uint", 0, "Uint", 0)
#IfWinNotActive,ahk_exe BH3.exe
~WheelUp::
~Wheeldown::
msgbox,% my
If MY < 1050
Return
IfInString,A_ThisHotKey,Up
Send,{Volume_Up}
Else
Send,{Volume_Down}
Return
UnHook:
DllCall("UnhookWindowsHookEx", "Uint", hHookMouse)
ExitApp
Mouse()
{
global my
MouseGetPoS,MX,MY
If (( MX = "1927" ) & ( MY = "1087" ))
{
Send ^!{Tab}
MouseMove,1926,1086
}
}
Esc::
ExitApp
Is there is a way to "pause" the function until the window is closed