public final class XUIAPlugin extends PluginAncestor
MScriptInterface.IGNORE_INHERITED_METHOD, MScriptInterface.NOT_MSCRIPT_METHOD, MScriptInterface.TO_PLUGIN
Constructor and Description |
---|
XUIAPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
click(String btnOption_p)
mouse click on left, right and middle button.
|
void |
clickAt(int x_p,
int y_p,
String btnOption_p)
perform mouse click at the coordinates specified.
|
void |
close()
INTERNAL USE ONLY
|
void |
doubleClick(String btnOption_p)
double click mouse button using the specified mouse buttons.
|
void |
doubleClickAt(int x_p,
int y_p,
String btnOption_p)
perform double click at the coordinates specified.
|
void |
dragDrop(int fromX_p,
int fromY_p,
int toX_p,
int toY_p,
String btnOption_p)
performs mouse drag and drop from one position to another
|
String |
getPixelColor(int x_p,
int y_p)
return the pixel color at the specified coordinates.
|
String |
getPluginDesc()
INTERNAL USE ONLY
|
String |
getPluginID()
INTERNAL USE ONLY
|
void |
initialize(MbtScriptExecutor scriptExec_p)
INTERNAL USE ONLY
|
void |
keyDown(String... keyCodeList_p)
send a keybord key down event as specified in the key token.
|
void |
keyUp(String... keyCodeList_p)
send a keybord event.
|
void |
mouseDown(String btnOption_p)
send mouse event: mouse down.
|
void |
mouseMove(int x_p,
int y_p)
Moves mouse pointer to given screen coordinates.
|
void |
mouseUp(String btnOption_p)
send mouse event: mouse up
|
void |
mouseWheel(String direction_p,
int notchNum_p)
Rotates the scroll wheel on wheel-equipped mice.
|
void |
sendKey(String... keyCodeList_p)
send a keybord event.
|
void |
setDoubleClickMillis(int millis_p)
sets the pause time between clicks for double click action.
|
String |
snapScreen()
takes a fullscreen snapshot of the window screen.
|
String |
snapScreen(int x_p,
int y_p,
int width_p,
int height_p)
takes a snapshot of the specified rectangle region of the window screen.
|
void |
start()
INTERNAL USE ONLY
|
void |
type(String text_p)
type a text string or a single function key.
|
void |
typeWithModifier(String text_p,
String modifiers_p)
type a text string into current UI element while holding down modifier keys
specified.
|
enterInitialState, exitFinalState
public void close()
INTERNAL USE ONLY
close
in class PluginAncestor
public void initialize(MbtScriptExecutor scriptExec_p)
INTERNAL USE ONLY
public String getPluginID()
INTERNAL USE ONLY
getPluginID
in class PluginAncestor
public void start() throws Exception
INTERNAL USE ONLY
start
in class PluginAncestor
Exception
public String getPluginDesc()
INTERNAL USE ONLY
getPluginDesc
in class PluginAncestor
public void type(String text_p) throws Exception
text_p
- Exception
public void typeWithModifier(String text_p, String modifiers_p) throws Exception
text_p
- modifiers_p
- modifier keys [KEYS.SHIFT][KEYS.CTRL]Exception
public void sendKey(String... keyCodeList_p) throws Exception
Example:
$sendKey ('[KEYS.ENTER]','[KEYS.TAB]')
keyCodeList_p
- one or more key codes with each key code in its own parameter as shown in the example above.
There is no limit of the number of key codes you may supply.Exception
public void keyDown(String... keyCodeList_p) throws Exception
Example:
<action code="$keyDown ('[KEYS.CONTROL]')"/> <action code="$type('this is a test')"/> <action code="$keyUp ('[KEYS.CONTROL]')"/>
keyCodeList_p
- one of more key codes. Accept more than one key codes with each key code specified in its own paramter.Exception
public void keyUp(String... keyCodeList_p) throws Exception
Example:
<action code="$keyDown ('[KEYS.CONTROL]')"/> <action code="$type('this is a test')"/> <action code="$keyUp ('[KEYS.CONTROL]')"/>
keyCodeList_p
- Exception
public void mouseMove(int x_p, int y_p) throws Exception
x_p
- x coordinate of the screeny_p
- y coordinate of the screenException
public void mouseDown(String btnOption_p)
btnOption_p
- L for left button, M for middle button, R for right button. Specify empty value ('') for default left mousepublic void mouseUp(String btnOption_p)
btnOption_p
- L for left button, M for middle button, R for right button. Specify empty value ('') for default left mousepublic void click(String btnOption_p) throws Exception
Example:
$click('LR')The above expression performs clicke action with both left and right mouse button.
btnOption_p
- L for left button, M for middle button, R for right button. Specify empty value ('') for default left mouseException
public void clickAt(int x_p, int y_p, String btnOption_p) throws Exception
x_p
- y_p
- btnOption_p
- L for left button, M for middle button, R for right button. Leave this blank for normal mouse click.Exception
public void setDoubleClickMillis(int millis_p)
millis_p
- public void doubleClick(String btnOption_p) throws Exception
btnOption_p
- L for left button, M for middle button, R for right button. Specify empty value ('') for default left mouse.Exception
public void doubleClickAt(int x_p, int y_p, String btnOption_p) throws Exception
x_p
- y_p
- btnOption_p
- L for left button, M for middle button, R for right button. Leave this blank for normal double click.Exception
public void dragDrop(int fromX_p, int fromY_p, int toX_p, int toY_p, String btnOption_p)
fromX_p
- x coordinate at start positionfromY_p
- y coordinate at start positiontoX_p
- x coordinate at target positiontoY_p
- y coordinate at target positionbtnOption_p
- L for left button, M for middle button, R for right button. Leave this blank for normal dragdrop operation (left mouse down).public void mouseWheel(String direction_p, int notchNum_p)
direction_p
- Up, others for Down.notchNum_p
- number of "notches" to move the mouse wheelpublic String getPixelColor(int x_p, int y_p)
x_p
- y_p
- public String snapScreen(int x_p, int y_p, int width_p, int height_p) throws Exception
x_p
- y_p
- width_p
- height_p
- Exception
Copyright TestOptimal, LLC