Code: Select all
#IfWinActive ahk_class IrfanView
LButton::
MouseGetPos,xpos, ypos
If (ypos >170 and ypos <570)
{
Msgbox %ypos%
Send, {Space}
}
#IfWinActive
Return
I have written the above code for sending the Space key when the Left Mouse button is clicked within a certain range on the Application window. It works when clicked within the range. However, when the Left Mouse button is clicked outside the range, the default behavior does not happen. For example, nothing happens when the Left Mouse button is clicked on the Application close button (which is outside the specified range).
Please help with inputs/solutions. Thanks.