C# Class AcTools.Windows.Input.MouseSimulator

Implements the IMouseSimulator interface by calling the an IInputMessageDispatcher to simulate Mouse gestures.
Inheritance: IMouseSimulator
Show file Open project: gro-ove/actools

Public Methods

Method Description
HorizontalScroll ( int scrollAmountInClicks ) : IMouseSimulator

Simulates a mouse horizontal wheel scroll gesture. Supported by Windows Vista and later.

LeftButtonClick ( ) : IMouseSimulator

Simulates a mouse left-click gesture.

LeftButtonDoubleClick ( ) : IMouseSimulator

Simulates a mouse left button double-click gesture.

LeftButtonDown ( ) : IMouseSimulator

Simulates a mouse left button down gesture.

LeftButtonUp ( ) : IMouseSimulator

Simulates a mouse left button up gesture.

MouseSimulator ( IInputSimulator inputSimulator ) : System

Initializes a new instance of the MouseSimulator class using an instance of a WindowsInputMessageDispatcher for dispatching InputEntry messages.

MoveMouseBy ( int pixelDeltaX, int pixelDeltaY ) : IMouseSimulator

Simulates mouse movement by the specified distance measured as a delta from the current mouse location in pixels.

MoveMouseTo ( double absoluteX, double absoluteY ) : IMouseSimulator

Simulates mouse movement to the specified location on the primary display device.

MoveMouseToPositionOnVirtualDesktop ( double absoluteX, double absoluteY ) : IMouseSimulator

Simulates mouse movement to the specified location on the Virtual Desktop which includes all active displays.

RightButtonClick ( ) : IMouseSimulator

Simulates a mouse right button click gesture.

RightButtonDoubleClick ( ) : IMouseSimulator

Simulates a mouse right button double-click gesture.

RightButtonDown ( ) : IMouseSimulator

Simulates a mouse right button down gesture.

RightButtonUp ( ) : IMouseSimulator

Simulates a mouse right button up gesture.

Sleep ( System.TimeSpan timeout ) : IMouseSimulator

Sleeps the executing thread to create a pause between simulated inputs.

Sleep ( int millsecondsTimeout ) : IMouseSimulator

Sleeps the executing thread to create a pause between simulated inputs.

VerticalScroll ( int scrollAmountInClicks ) : IMouseSimulator

Simulates mouse vertical wheel scroll gesture.

XButtonClick ( int buttonId ) : IMouseSimulator

Simulates a mouse X button click gesture.

XButtonDoubleClick ( int buttonId ) : IMouseSimulator

Simulates a mouse X button double-click gesture.

XButtonDown ( int buttonId ) : IMouseSimulator

Simulates a mouse X button down gesture.

XButtonUp ( int buttonId ) : IMouseSimulator

Simulates a mouse X button up gesture.

Private Methods

Method Description
MouseSimulator ( IInputSimulator inputSimulator, IInputMessageDispatcher messageDispatcher ) : System

Initializes a new instance of the MouseSimulator class using the specified IInputMessageDispatcher for dispatching InputEntry messages.

SendSimulatedInput ( InputEntry inputList ) : void

Sends the list of InputEntry messages using the IInputMessageDispatcher instance.

Method Details

HorizontalScroll() public method

Simulates a mouse horizontal wheel scroll gesture. Supported by Windows Vista and later.
public HorizontalScroll ( int scrollAmountInClicks ) : IMouseSimulator
scrollAmountInClicks int The amount to scroll in clicks. A positive value indicates that the wheel was rotated to the right; a negative value indicates that the wheel was rotated to the left.
return IMouseSimulator

LeftButtonClick() public method

Simulates a mouse left-click gesture.
public LeftButtonClick ( ) : IMouseSimulator
return IMouseSimulator

LeftButtonDoubleClick() public method

Simulates a mouse left button double-click gesture.
public LeftButtonDoubleClick ( ) : IMouseSimulator
return IMouseSimulator

LeftButtonDown() public method

Simulates a mouse left button down gesture.
public LeftButtonDown ( ) : IMouseSimulator
return IMouseSimulator

LeftButtonUp() public method

Simulates a mouse left button up gesture.
public LeftButtonUp ( ) : IMouseSimulator
return IMouseSimulator

MouseSimulator() public method

Initializes a new instance of the MouseSimulator class using an instance of a WindowsInputMessageDispatcher for dispatching InputEntry messages.
public MouseSimulator ( IInputSimulator inputSimulator ) : System
inputSimulator IInputSimulator The that owns this instance.
return System

MoveMouseBy() public method

Simulates mouse movement by the specified distance measured as a delta from the current mouse location in pixels.
public MoveMouseBy ( int pixelDeltaX, int pixelDeltaY ) : IMouseSimulator
pixelDeltaX int The distance in pixels to move the mouse horizontally.
pixelDeltaY int The distance in pixels to move the mouse vertically.
return IMouseSimulator

MoveMouseTo() public method

Simulates mouse movement to the specified location on the primary display device.
public MoveMouseTo ( double absoluteX, double absoluteY ) : IMouseSimulator
absoluteX double The destination’s absolute X-coordinate on the primary display device where 0 is the extreme left hand side of the display device and 65535 is the extreme right hand side of the display device.
absoluteY double The destination’s absolute Y-coordinate on the primary display device where 0 is the top of the display device and 65535 is the bottom of the display device.
return IMouseSimulator

MoveMouseToPositionOnVirtualDesktop() public method

Simulates mouse movement to the specified location on the Virtual Desktop which includes all active displays.
public MoveMouseToPositionOnVirtualDesktop ( double absoluteX, double absoluteY ) : IMouseSimulator
absoluteX double The destination’s absolute X-coordinate on the virtual desktop where 0 is the left hand side of the virtual desktop and 65535 is the extreme right hand side of the virtual desktop.
absoluteY double The destination’s absolute Y-coordinate on the virtual desktop where 0 is the top of the virtual desktop and 65535 is the bottom of the virtual desktop.
return IMouseSimulator

RightButtonClick() public method

Simulates a mouse right button click gesture.
public RightButtonClick ( ) : IMouseSimulator
return IMouseSimulator

RightButtonDoubleClick() public method

Simulates a mouse right button double-click gesture.
public RightButtonDoubleClick ( ) : IMouseSimulator
return IMouseSimulator

RightButtonDown() public method

Simulates a mouse right button down gesture.
public RightButtonDown ( ) : IMouseSimulator
return IMouseSimulator

RightButtonUp() public method

Simulates a mouse right button up gesture.
public RightButtonUp ( ) : IMouseSimulator
return IMouseSimulator

Sleep() public method

Sleeps the executing thread to create a pause between simulated inputs.
public Sleep ( System.TimeSpan timeout ) : IMouseSimulator
timeout System.TimeSpan The time to wait.
return IMouseSimulator

Sleep() public method

Sleeps the executing thread to create a pause between simulated inputs.
public Sleep ( int millsecondsTimeout ) : IMouseSimulator
millsecondsTimeout int The number of milliseconds to wait.
return IMouseSimulator

VerticalScroll() public method

Simulates mouse vertical wheel scroll gesture.
public VerticalScroll ( int scrollAmountInClicks ) : IMouseSimulator
scrollAmountInClicks int The amount to scroll in clicks. 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.
return IMouseSimulator

XButtonClick() public method

Simulates a mouse X button click gesture.
public XButtonClick ( int buttonId ) : IMouseSimulator
buttonId int The button id.
return IMouseSimulator

XButtonDoubleClick() public method

Simulates a mouse X button double-click gesture.
public XButtonDoubleClick ( int buttonId ) : IMouseSimulator
buttonId int The button id.
return IMouseSimulator

XButtonDown() public method

Simulates a mouse X button down gesture.
public XButtonDown ( int buttonId ) : IMouseSimulator
buttonId int The button id.
return IMouseSimulator

XButtonUp() public method

Simulates a mouse X button up gesture.
public XButtonUp ( int buttonId ) : IMouseSimulator
buttonId int The button id.
return IMouseSimulator