Code: Select all
#NoEnv
#SingleInstance, force
SendMode, Input
#UseHook
CoordMode, Mouse, Screen
;GUI...............................................
GUI, 1:+AlwaysOnTop +ToolWindow +E0x20
GUI, 1:Color, 0xFF0000
GUI, 1:Show, x800 y0 w5 h1000,Gui 1
GUI, 2:+AlwaysOnTop +ToolWindow +E0x20
GUI, Color, 0xFF0000
GUI, 2:Show, x895 y0 w5 h1000,Gui 2
;....................................................
#Persistent
stateA := False
SetTimer, labelA, 25
#Persistent
stateD := False
SetTimer, labelB, 25
return
;PRESSING KEYS WITH MOUSE COORDINATES
labelA:
if(mouseInRegion(0, 0, 800, 1079)) {
Send, {Left down}
stateA := True
} else if(stateA) {
Send, {Left up}
stateA := False
}
labelB:
if(mouseInRegion(900,0,1919,1079)) {
Send, {Right down}
stateB := True
} else if(stateB) {
Send, {Right up}
stateB := False
}
return
;................................................................
~LButton::
Send {w}
return
mouseInRegion(x1, y1, x2, y2) {
MouseGetPos x, y
return (x >= x1) && (x <= x2) && (y >= y1) && (y <= y2)
}
o::ExitApp
m::Suspend