SUB(_MOUSE_EVENT, $event, $x, $y, $_hwnd)
$_SUB_DELAY_MOUSE_EVENT = 25
SWITCH($event)
CASE("LCLICK")
SENDMESSAGE($_hwnd, 0x0201, 0x0001, $x + ($y*65536))
WAITMS($_SUB_DELAY_MOUSE_EVENT)
SENDMESSAGE($_hwnd, 0x0202, 0x0001, $x + ($y*65536))
CASE("RCLICK")
SENDMESSAGE($_hwnd, 0x0204, 0x0002, $x + ($y*65536))
WAITMS($_SUB_DELAY_MOUSE_EVENT)
SENDMESSAGE($_hwnd, 0x0205, 0x0002, $x + ($y*65536))
CASE("MCLICK")
SENDMESSAGE($_hwnd, 0x0207, 0x0010, $x + ($y*65536))
WAITMS($_SUB_DELAY_MOUSE_EVENT)
SENDMESSAGE($_hwnd, 0x0208, 0x0010, $x + ($y*65536))
CASE("DBLCLICK")
SENDMESSAGE($_hwnd, 0x0203, 0x0001, $x + ($y*65536))
CASE("LDOWN")
SENDMESSAGE($_hwnd, 0x0201, 0x0001, $x + ($y*65536))
CASE("LUP")
SENDMESSAGE($_hwnd, 0x0202, 0x0001, $x + ($y*65536))
CASE("RDOWN")
SENDMESSAGE($_hwnd, 0x0204, 0x0002, $x + ($y*65536))
CASE("RUP")
SENDMESSAGE($_hwnd, 0x0205, 0x0002, $x + ($y*65536))
CASE("MDOWN")
SENDMESSAGE($_hwnd, 0x0207, 0x0010, $x + ($y*65536))
CASE("MUP")
SENDMESSAGE($_hwnd, 0x0208, 0x0010, $x + ($y*65536))
CASE("MOVE")
SENDMESSAGE($_hwnd, 0x0200, 0, $x + ($y*65536))
END_SWITCH
END_SUB