---------------------------
Test.ahk
---------------------------
Error: Parameter #2 must match an existing #If expression.
Line#
---> 012: Hotkey,If,!Basic_MouseIsOver("Total Commander,NL Hold'em,Google Earth,overlay,Remote Desktop Connection,Civilization V,Warcraft III,Autodesk AutoCAD 2014", "#32770", "TV_REMOTEDESKTOP_CLASS1")
013: Hotkey,Rbutton,,P10
017: MsgBox
018: Return
023: {
026: ListLines,OFF
027: MouseGetPos,,,MouseIsOver_ID,MouseIsOver_Control
028: if Control
The program will exit.
---------------------------
OK
---------------------------
Code: Select all
#SingleInstance
Hotkey, If, !Basic_MouseIsOver("Total Commander,NL Hold'em,Google Earth,overlay,Remote Desktop Connection,Civilization V,Warcraft III,Autodesk AutoCAD 2014", "#32770", "TV_REMOTEDESKTOP_CLASS1")
Hotkey, Rbutton, , P10
#If !Basic_MouseIsOver("Total Commander,NL Hold'em,Google Earth,overlay,Remote Desktop Connection,Civilization V,Warcraft III,Autodesk AutoCAD 2014", "#32770", "TV_REMOTEDESKTOP_CLASS1")
Rbutton:
msgbox
return
#if
Basic_MouseIsOver(WinTitle:="", WinClass:="", Control:="", ExcludeTitle:="") {
global
local Class, Title
ListLines, OFF
MouseGetPos,,, MouseIsOver_ID, MouseIsOver_Control
If Control
If MouseIsOver_Control contains %Control%
return true
If WinClass
{
WingetClass, Class, ahk_id %MouseIsOver_ID%
If Class contains %Winclass%
return true
}
if WinTitle
{
WingetTitle, Title, ahk_id %MouseIsOver_ID%
If Title contains %WinTitle%
return true
}
return false
}