Methods Details

mouseClickAt

public void mouseClickAt(int x, int y)

Perform a left click at the specified coordinates with the mouse.

Parameters:

Coordinates (x, y) where to click : x - X position y - Y position

Find out how to get the coordinates of a specific point on a screen

mouseRightClickAt

public void mouseRightClickAt(int x, int y)

Perform a right click at the specified coordinates with the mouse.

Parameters:

Coordinates (x, y) where to click : x - X position y - Y position

Find out how to get the coordinates of a specific point on a screen

mouseDoubleClick

public void mouseDoubleClick(int x, int y)

Perform a double click at the specified coordinates with the mouse.

Parameters:

Coordinates (x, y): x - X position y - Y position

Find out how to get the coordinates of a specific point on a screen

mouseDragAndDrop

public void mouseDragAndDrop(int srcX, int srcY, int destX, int destY)

Perform a drag and drop movement from a source coordinate to a destination coordinate with the mouse.

Parameters:

srcX - X source position srcY - Y source position destX - X destination position destY - Y destination position

Find out how to get the coordinates of a specific point on a screen

Details : The robot will press the mouse right-button at source coordinates, move the cursor to destination index and release the button*

pressEnter

public void pressEnter()

Perform a keyPress/keyRelease on the ENTER key.

typeText

public void typeText(String text)

Write text as direct keyboard input.

Parameters:

text - Text to write (Work with A-Z letters, space, numbers and dot)

writeText

public void writeText(String text)

Write text with the bot by pasting a given string from the clipboard.

Parameters:

text - Text to write (to paste)

closeCurrentWindows

public void closeCurrentWindows()

Close the current windows (Equivalent of closeCurrentWindows(false))

public void closeCurrentWindows(boolean quit)

Close the current windows or quit an app

Parameters:

quit - true completely quit the current app (on macOS only)

shortcut

public void shortcut(int keycode)

Perform a keyboard shortcut with the cmd or ctrl key (depending of the os) and another specified key

Parameters:

keycode - Second key to press

We recommend you to import java.awt.event.KeyEvent, to enumerate the possible keycodes (e.g. KeyEvent.VK_A)

public void macShowSpotlight()

Do a "cmd + space" to show the Spotlight search box on macOS.

public void windowsShowStart(String text)

Perform a keyPress/keyRelease on the Windows key to show the start menu.

messageSender

public void messageSender(int x, int y, String text)

Write text in a text box and "send" it one time (by pressing enter).

Parameters:

x - X Position of the text box y - Y Position of the text box text - Text to send

public void messageSender(int x, int y, String text, int frequency)

Write text in a text box and "send" it several times (by pressing enter).

Parameters:

x - X Position of the text box y - Y Position of the text box text - Text to send frequency - Number of repetitions

public void messageSender(int x, int y, String text, int frequency, int interval)

Write string in a text box and "send" it several times (by pressing enter), at a given interval.

Parameters:

x - X Position of the text box y - Y Position of the text box text - Text to send frequency - Number of repetitions interval - Delay between each sending (in ms)

Find out how to get the coordinates of a specific point on a screen

Last updated