Code: Select all
#If (MouseIsOver("ThunderRT6PictureBoxDC56") OR MouseIsOver("ThunderRT6PictureBoxDC57"))
~LButton:: ; Long press (> 1. sec) on * substitutes the dot multiply
ctrlState := GetKeyState("Control", "P") ? 1 : 0
KeyWait, LButton, T0.4 ; Wait no more than .4 sec for key release (also suppress auto-repeat)
If ErrorLevel { ; timeout, so long press
Send {Click Left}
If ctrlState { ;if GetKeyState("Control", "P") {
soundbeep
Sendinput {BLIND}^{Numpad4} ;Run, D:\Tools\XYplorer\XYplorer.exe /script=::#1445
} Else
soundbeep
SendInput {Numpad4}
KeyWait, LButton
} Else ; otherwise...
Send {Click Left} ; ...just send
Return
MouseIsOver(controlName) {
MouseGetPos, , , , controlNameUnderMouse
return (controlName = controlNameUnderMouse) ? 1 : 0
}