public class AutoItXPlus
extends autoitx4java.AutoItX
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTOIT_ALT_DOWN |
static java.lang.String |
AUTOIT_ALT_UP |
static java.lang.String |
AUTOIT_CTRL_DOWN |
static java.lang.String |
AUTOIT_CTRL_UP |
static java.lang.String |
AUTOIT_KEYWORD_CONTROLCLICK
AutoIt 'ControlClick' keyword, sends a mouse click command to a given control.
|
static java.lang.String |
AUTOIT_KEYWORD_MOUSEMOVE
AutoIt 'MouseMove' keyword, moves the mouse pointer.
|
static java.lang.String |
AUTOIT_KEYWORD_MOUSEMOVE_SPEED
AutoIt mouse move 'speed', its range is from 1 to 100, and default value is 10.
|
static java.lang.String |
AUTOIT_KEYWORD_SEND
AutoIt 'Send' keyword, sends simulated keystrokes to the active window.
|
static java.lang.String |
AUTOIT_LEFT_WINDOWS_DOWN |
static java.lang.String |
AUTOIT_LEFT_WINDOWS_UP |
static java.lang.String |
AUTOIT_MOUSE_BUTTON_LEFT
AutoIt's click button constants
|
static java.lang.String |
AUTOIT_MOUSE_BUTTON_MIDDLE |
static java.lang.String |
AUTOIT_MOUSE_BUTTON_RIGHT |
static java.lang.String |
AUTOIT_RIGHT_WINDOWS_DOWN |
static java.lang.String |
AUTOIT_RIGHT_WINDOWS_UP |
static java.lang.String |
AUTOIT_SHIFT_DOWN |
static java.lang.String |
AUTOIT_SHIFT_UP |
static java.lang.String |
AUTOIT_SUPPORT_PRESS_ALT
AutoIt's supporting KeyPress/KeyDown keywords
|
static java.lang.String |
AUTOIT_SUPPORT_PRESS_CTRL |
static java.lang.String |
AUTOIT_SUPPORT_PRESS_LWINDOWS |
static java.lang.String |
AUTOIT_SUPPORT_PRESS_RWINDOWS |
static java.lang.String |
AUTOIT_SUPPORT_PRESS_SHIFT |
static boolean |
DEFAULT_SUPPORT_SPECIALKEY
According to https://www.autoitscript.com/autoit3/docs/functions/Send.htm, AutoIt's 'Send()'
method contains the optional parameter 'flag' to indicate if text contains special characters like + and !
to indicate SHIFT and ALT key-presses.
|
autoItX, OPT_CARET_COORD_MODE, OPT_MOUSE_CLICK_DELAY, OPT_MOUSE_CLICK_DOWN_DELAY, OPT_MOUSE_CLICK_DRAG_DELAY, OPT_MOUSE_COORD_MODE, OPT_PIXEL_COORD_MODE, OPT_SEND_ATTACH_MODE, OPT_SEND_CAPSLOCK_MODE, OPT_SEND_KEY_DELAY, OPT_SEND_KEY_DOWN_DELAY, OPT_WIN_DETECT_HIDDEN_TEXT, OPT_WIN_SEARCH_CHILDREN, OPT_WIN_TEXT_MATCH_MODE, OPT_WIN_TITLE_MATCH_MODE, OPT_WIN_WAIT_DELAY, SW_HIDE, SW_MAXIMIZE, SW_RESTORE, SW_SHOW, SW_SHOWDEFAULT, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED, SW_SHOWMINNOACTIVE, SW_SHOWNA, SW_SHOWNOACTIVATE, SW_SHOWNORMAL
Constructor and Description |
---|
AutoItXPlus() |
Modifier and Type | Method and Description |
---|---|
int |
autoit2JavaButtonmask(java.lang.String autoitButton)
Transform AutoIt button RS into Java button mask.
|
int |
autoit2JavaSpecialKey(java.lang.String autoitSpecialKey)
Transform AutoIt Special Key RS into Java key code.
|
boolean |
click(java.lang.String title,
java.lang.String text,
java.lang.String controlID,
java.lang.String button,
int nClicks,
java.awt.Point offset,
java.lang.String specialKey)
Workhorse of click action.
|
com.jacob.com.Variant[] |
convertCOMParams(java.lang.String[] paramMsgs)
Convert parameters String array into com.jacob.com.Variant array.
|
int |
getBorderWidth(java.lang.String title,
java.lang.String text)
Get the border width of a window.
|
int |
getTitleBarHeight(java.lang.String title,
java.lang.String text)
Get the title height of a window.
|
boolean |
isValidMouseButton(java.lang.String mouseButton)
Check if the mouse button string is acceptable for AutoIt engine.
|
void |
mouseHover(java.awt.Point pos,
int milliSeconds)
Implement AutoItX's workhorse for keyword 'HoverMouse'.
|
boolean |
robotClick(int x,
int y,
java.lang.String button,
int nClicks,
java.awt.Point offset,
java.lang.String specialKey)
Workhorse of Java AWT Robot click action.
|
boolean |
supportHoldingKeyPress(java.lang.String keyStr)
According to https://www.autoitscript.com/autoit3/docs/functions/Send.htm, AutoIt supports
5 keys pairs:
1.
|
java.lang.String |
wrapKeyPress(java.lang.String keyStr) |
java.lang.String |
wrapKeyUp(java.lang.String keyStr) |
autoItSetOption, blockInput, cdTray, clipGet, clipPut, controlBool, controlClick, controlClick, controlClick, controlClick, controlCommandAddString, controlCommandBoolean, controlCommandCheck, controlCommandCurrentTab, controlCommandDeleteString, controlCommandEditPaste, controlCommandFindString, controlCommandGetCurrentCol, controlCommandGetCurrentLine, controlCommandGetCurrentSelection, controlCommandGetLineCount, controlCommandGetSelected, controlCommandHideDropDown, controlCommandInts, controlCommandIsChecked, controlCommandIsEnabled, controlCommandIsVisible, controlCommandSelectString, controlCommandSetCurrentSelection, controlCommandShowDropdown, controlCommandString, controlCommandTabLeft, controlCommandTabRight, controlCommandUncheck, controlCommandVariant, controlCommandVoid, controlDisable, controlEnable, controlFocus, controlGetFocus, controlGetFocus, controlGetHandle, controlGetPosHeight, controlGetPosWidth, controlGetPosX, controlGetPosY, controlGetText, controlHide, controlInt, controlListViewFindItem, controlListViewGetItemCount, controlListViewGetSelected, controlListViewGetSelectedArray, controlListViewGetSelectedCount, controlListViewGetSubItemCount, controlListViewGetText, controlListViewInt, controlListViewIsSelected, controlListViewSelect, controlListViewSelectAll, controlListViewSelectAll, controlListViewSelectClear, controlListViewSelectInvert, controlListViewSelectViewChange, controlListViewString, controlMove, controlMove, controlSend, controlSend, ControlSetText, controlShow, controlString, controlTreeViewBoolean, controlTreeViewCheck, controlTreeViewCollapse, controlTreeViewExists, controlTreeViewExpand, controlTreeViewGetItemCount, controlTreeViewGetSelectedItemIndex, controlTreeViewGetSelectedItemText, controlTreeViewGetText, controlTreeViewInt, controlTreeViewIsChecked, controlTreeViewSelect, controlTreeViewString, controlTreeViewUncheck, controlVariant, controlView, driveMapAdd, driveMapAdd, driveMapAdd, driveMapDelete, driveMapGet, getError, getVersion, iniDelete, iniDelete, iniRead, iniWrite, isAdmin, mouseClick, mouseClick, mouseClickDrag, mouseClickDrag, mouseDown, mouseGetCursor, mouseGetPosX, mouseGetPosY, mouseMove, mouseMove, mouseUp, mouseWheel, mouseWheel, oneToTrue, oneToTrue, pixelChecksum, pixelChecksum, pixelGetColor, pixelSearch, pixelSearch, processClose, processExists, processSetPriority, processWait, processWait, processWaitClose, processWaitClose, regDeleteKey, regDeleteVal, regEnumKey, regEnumVal, regRead, regWrite, run, run, run, runAsSet, runAsSet, runWait, runWait, runWait, safeString, send, send, setOption, shutdown, sleep, statusbarGetText, StatusbarGetText, statusbarGetText, toolTip, toolTip, winActivate, winActivate, winActive, winActive, winClose, winClose, winExists, winExists, winGetCaretPosX, winGetCaretPosY, winGetClassList, winGetClientSizeHeight, winGetClientSizeHeight, winGetClientSizeWidth, winGetClientSizeWidth, winGetHandle, winGetHandle, winGetPosHeight, winGetPosHeight, winGetPosWidth, winGetPosWidth, winGetPosX, winGetPosX, winGetPosY, winGetPosY, winGetProcess, winGetProcess, winGetState, winGetState, winGetText, winGetText, winGetTitle, winGetTitle, winKill, winKill, winList, winList, winMenuSelectItem, winMenuSelectItem, winMenuSelectItem, winMenuSelectItem, winMinimizeAll, winMinimizeAllUndo, winMove, winMove, winSetOnTop, winSetState, winSetTitle, winSetTrans, winVariant, winVariant, winVariantBool, winVariantBool, winVariantBool, winWait, winWait, winWait, winWaitActive, winWaitActive, winWaitActive, winWaitClose, winWaitClose, winWaitClose, winWaitNoActive, winWaitNoActive, winWaitNoActive
public static final boolean DEFAULT_SUPPORT_SPECIALKEY
public static final java.lang.String AUTOIT_KEYWORD_SEND
public static final java.lang.String AUTOIT_KEYWORD_CONTROLCLICK
public static final java.lang.String AUTOIT_KEYWORD_MOUSEMOVE
public static final java.lang.String AUTOIT_KEYWORD_MOUSEMOVE_SPEED
public static final java.lang.String AUTOIT_SUPPORT_PRESS_ALT
public static final java.lang.String AUTOIT_SUPPORT_PRESS_SHIFT
public static final java.lang.String AUTOIT_SUPPORT_PRESS_CTRL
public static final java.lang.String AUTOIT_SUPPORT_PRESS_LWINDOWS
public static final java.lang.String AUTOIT_SUPPORT_PRESS_RWINDOWS
public static final java.lang.String AUTOIT_ALT_DOWN
public static final java.lang.String AUTOIT_ALT_UP
public static final java.lang.String AUTOIT_SHIFT_DOWN
public static final java.lang.String AUTOIT_SHIFT_UP
public static final java.lang.String AUTOIT_CTRL_DOWN
public static final java.lang.String AUTOIT_CTRL_UP
public static final java.lang.String AUTOIT_LEFT_WINDOWS_DOWN
public static final java.lang.String AUTOIT_LEFT_WINDOWS_UP
public static final java.lang.String AUTOIT_RIGHT_WINDOWS_DOWN
public static final java.lang.String AUTOIT_RIGHT_WINDOWS_UP
public static final java.lang.String AUTOIT_MOUSE_BUTTON_LEFT
public static final java.lang.String AUTOIT_MOUSE_BUTTON_MIDDLE
public static final java.lang.String AUTOIT_MOUSE_BUTTON_RIGHT
public com.jacob.com.Variant[] convertCOMParams(java.lang.String[] paramMsgs)
paramMsgs
- String[], string array parameterspublic boolean isValidMouseButton(java.lang.String mouseButton)
mouseButton
- String, the button to click, null, empty, "left", "right", or "middle" are acceptable.public boolean supportHoldingKeyPress(java.lang.String keyStr)
keyStr
- String,public java.lang.String wrapKeyPress(java.lang.String keyStr)
public java.lang.String wrapKeyUp(java.lang.String keyStr)
public int autoit2JavaButtonmask(java.lang.String autoitButton) throws SAFSException
SAFSException
public int autoit2JavaSpecialKey(java.lang.String autoitSpecialKey) throws SAFSException
autoitSpecialKey
- String, AutoIt supported special key.SAFSException
- throw exception when meeting unsupported special key.public boolean robotClick(int x, int y, java.lang.String button, int nClicks, java.awt.Point offset, java.lang.String specialKey) throws java.lang.Exception
x
- int, absolute screen x coordinate of component.y
- int, absolute screen y coordinate of component.button
- String, button to click, "left", "right" or "middle".nClicks
- int, number of times to click the mouse. It's supposed to be greater than or equal to 1.offset
- Point, position to click within the control. It can be null or empty String. Default value is center.specialKey
- String, keyboard key that be hold when click action happening. It can be null or empty String.java.lang.Exception
public int getBorderWidth(java.lang.String title, java.lang.String text)
title
- String, title of the window to access.text
- String, text of the window to access.public int getTitleBarHeight(java.lang.String title, java.lang.String text)
title
- String, title of the window to access.text
- String, text of the window to access.public boolean click(java.lang.String title, java.lang.String text, java.lang.String controlID, java.lang.String button, int nClicks, java.awt.Point offset, java.lang.String specialKey)
title
- String, title of the window to access.text
- String, text of the window to access.controlID
- String, control to interact with.button
- String, button to click, "left", "right" or "middle".nClicks
- int, number of times to click the mouse. It's supposed to be greater than or equal to 1.offset
- Point, position to click within the control. It can be null or empty String. Default value is center.specialKey
- String, keyboard key that be hold when click action happening. It can be null or empty String.public void mouseHover(java.awt.Point pos, int milliSeconds) throws SAFSException
pos
- Point, the screen position to hover the mouse, which must NOT be null or empty.milliseconds
- double, the period to hover the mouse, in millisecondsSAFSException
Copyright © SAS Institute. All Rights Reserved.