Class mouse
Mouse functions.
public static class mouse
Remarks
Should not be used to click windows of own thread. It may work or not. If need, use another thread. Example in keys.send.
Namespace: Au
Assembly: Au.dll
Properties
Name | Description |
---|---|
lastXY | Mouse cursor position of the most recent successful "mouse move" or "mouse click" function call in this thread. If such functions are still not called in this thread, returns mouse.xy. |
xy | Gets cursor (mouse pointer) position. |
Methods
Name | Description |
---|---|
click(Coord, Coord) | Left button click at position x y. |
click(wnd, Coord, Coord, bool) | Left button click at position x y relative to window w. |
click(bool) | Left button click. |
clickEx(MButton, Coord, Coord) | Clicks, double-clicks, presses or releases a mouse button at the specified position in screen. |
clickEx(MButton, MObject, Coord, Coord) | Clicks, double-clicks, presses or releases a mouse button at position x y relative to UI object obj. |
clickEx(MButton, POINT) | Clicks, double-clicks, presses or releases a mouse button at the specified position in screen. |
clickEx(MButton, wnd, Coord, Coord, bool) | Clicks, double-clicks, presses or releases a mouse button at position x y relative to window w. |
clickEx(MButton, bool) | Clicks, double-clicks, presses or releases a mouse button. By default does not move the mouse cursor. |
doubleClick(Coord, Coord) | Left button double click at position x y. |
doubleClick(wnd, Coord, Coord, bool) | Left button double click at position x y relative to window w. |
doubleClick(bool) | Left button double click. |
drag(MObject, Coord, Coord, int, int, MButton, KMod, int, int) | Presses a mouse button in object obj, moves the mouse cursor by offset dxdy and releases the button. |
drag(MObject, Coord, Coord, string, MButton, KMod, int) | Presses a mouse button in object obj, moves the mouse cursor using multiple recorded offsets and releases the button. |
drag(MObject, MObject, Coord, Coord, Coord, Coord, MButton, KMod, int, int) | Presses a mouse button in object o1, moves the mouse cursor to object o2 and releases the button. |
isPressed(MButtons) | Returns |
leftDown(Coord, Coord) | Left button down (press and don't release) at position x y. |
leftDown(wnd, Coord, Coord, bool) | Left down (press and don't release) at position x y relative to window w. |
leftDown(bool) | Left button down (press and don't release). |
leftUp(Coord, Coord) | Left button up (release pressed button) at position x y. |
leftUp(wnd, Coord, Coord, bool) | Left button up (release pressed button) at position x y relative to window w. |
leftUp(bool) | Left button up (release pressed button). |
move(Coord, Coord) | Moves the cursor (mouse pointer) to the specified position in screen. |
move(MObject, Coord, Coord) | Moves the cursor (mouse pointer) to the position x y relative to UI object obj. |
move(POINT) | Moves the cursor (mouse pointer) to the specified position in screen. |
move(wnd, Coord, Coord, bool) | Moves the cursor (mouse pointer) to the position x y relative to window w. |
moveBy(int, int, bool) | Moves the cursor (mouse pointer) relative to mouse.lastXY or mouse.xy. |
moveBy(string, double) | Moves the cursor (mouse pointer) relative to mouse.lastXY. Uses multiple x y offsets. |
postClick(wnd, Coord, Coord, MButton, RECT?) | Posts mouse-click messages to the window. |
restore() | Moves the mouse cursor where it was at the time of the last mouse.save call in this thread. If it was not called - of the first "mouse move" or "mouse click" function call in this thread. Does nothing if these functions were not called. |
rightClick(Coord, Coord) | Right button click at position x y. |
rightClick(wnd, Coord, Coord, bool) | Right button click at position x y relative to window w. |
rightClick(bool) | Right button click. |
rightDown(Coord, Coord) | Right button down (press and don't release) at position x y. |
rightDown(wnd, Coord, Coord, bool) | Right button down (press and don't release) at position x y relative to window w. |
rightDown(bool) | Right button down (press and don't release). |
rightUp(Coord, Coord) | Right button up (release pressed button) at position x y. |
rightUp(wnd, Coord, Coord, bool) | Right button up (release pressed button) at position x y relative to window w. |
rightUp(bool) | Right button up (release pressed button). |
save() | Remembers current mouse cursor position to be later restored with mouse.restore. |
waitForClick(Seconds, MButtons, bool, bool) | Waits for button-down or button-up event of the specified mouse button or buttons. |
waitForClick(Seconds, bool, bool) | Waits for button-down or button-up event of any mouse button, and gets the button code. |
waitForCursor(Seconds, MCursor, bool) | Waits for a standard mouse cursor (pointer) visible. |
waitForCursor(Seconds, long, bool) | Waits for a nonstandard mouse cursor (pointer) visible. |
waitForNoButtonsPressed(Seconds, MButtons) | Waits while some mouse buttons are pressed. See mouse.isPressed. |
wheel(double, bool) | Mouse wheel forward or backward. |