Function Reference


_WinAPI_Mouse_Event

Synthesizes mouse motion and button clicks

#include <WinAPISys.au3>
_WinAPI_Mouse_Event ( $iFlags [, $iX = 0 [, $iY = 0 [, $iData = 0 [, $iExtraInfo = 0]]]] )

Parameters

$iFlags A set of flag bits that specify various aspects of mouse motion and button clicking. The bits
in this parameter can be any reasonable combination of the following values:
$MOUSEEVENTF_ABSOLUTE - Specifies that the $iX and $iY parameters contain normal absolute coordinates. If
not set, those parameters contain relative data. The change in position since the last reported position.
This flag can be set, or not set, regardless of what kind of mouse or mouse-like device, if any, is connected
to the system.
$MOUSEEVENTF_MOVE - Specifies that movement occurred
$MOUSEEVENTF_LEFTDOWN - Specifies that the left button changed to down
$MOUSEEVENTF_LEFTUP - Specifies that the left button changed to up
$MOUSEEVENTF_RIGHTDOWN - Specifies that the right button changed to down
$MOUSEEVENTF_RIGHTUP - Specifies that the right button changed to up
$MOUSEEVENTF_MIDDLEDOWN - Specifies that the middle button changed to down
$MOUSEEVENTF_MIDDLEUP - Specifies that the middle button changed to up
$MOUSEEVENTF_WHEEL - Specifies that the wheel has been moved, if the mouse has a wheel
$MOUSEEVENTF_XDOWN - Specifies that an X button was pressed
$MOUSEEVENTF_XUP - Specifies that an X button was released
$iX [optional] Specifies the mouse's absolute position along the X axis or its amount of motion since the
last mouse event was generated depending on the setting of $MOUSEEVENTF_ABSOLUTE. Absolute data is given as
the mouse's actual X coordinate relative data is given as the number of mickeys moved.
$iY [optional] Specifies the mouse's absolute position along the Y axis or its amount of motion since the
last mouse event was generated depending on the setting of $MOUSEEVENTF_ABSOLUTE. Absolute data is given as
the mouse's actual Y coordinate relative data is given as the number of mickeys moved.
$iData [optional] If $iFlags is $MOUSEEVENTF_WHEEL, then $iData specifies the amount of wheel movement. A positive
value indicates that the wheel was rotated forward away from the user. A negative value indicates that the
wheel was rotated backward, toward the user. One wheel click is defined as $WHEEL_DELTA, which is 120. If
$iFlags is not $MOUSEEVENTF_WHEEL, then $iData should be zero.
$iExtraInfo [optional] Specifies a 32 bit value associated with the mouse event

Return Value

None.

Remarks

Above constants require #include <Constants.au3>

See Also

Search mouse_event in MSDN Library.