public class Commands extends Object
Constructor and Description |
---|
Commands() |
Modifier and Type | Method and Description |
---|---|
static Object |
call(String function,
Object... args)
INTERNAL USE: call interface for JavaScript to be used with predefined functions
|
static Object |
circle(Object args) |
static Location |
click(Object... args)
move the mouse with hover() and click using the left button
|
static Location |
doubleClick(Object... args)
move the mouse with hover() and double click using the left button
|
static Match |
exists(Object... args)
wait for the given visual to appear within the given wait time
|
static Object |
fromJSON(Object aObj)
experimental: create the real object from the given JSON
take care: content length not checked if valid (risk for index out of bounds) planned to be used with a socket/RPC based interface to any framework (e.g. |
static Location |
hover(Object... args)
move the mouse to the given location with a given offset
3 parameter configurations: --1: wait for a visual and move mouse to it (args see wait()) --2: move to the given region/location/match with a given offset --3: move to the given offset relative to the last match of the region in use |
static boolean |
isJSON(Object aObj)
check wether the given object is in JSON format as ["ID", ...]
|
static boolean |
isNashorn() |
static boolean |
paste(Object... args)
just doing a currentRegion.paste(text) (see paste())
|
static void |
restoreUsed()
INTERNAL USE: restore a saved use() after a use1()
|
static Location |
rightClick(Object... args)
move the mouse with hover() and do a right click
|
static Object |
run(Object... args) |
static Region |
use(Object... args)
all following undotted function calls will use the given screen or region
until this is changed by a later use()
-- no args: use Screen(0) (this is the default after start) -- a number: use Screen(number), Screen(0) if not valid -- a region: use the given region |
static Region |
use1(Object... args)
same as use(), but only affects the next processed undotted function
after that the use() active before is restored
|
static Match |
wait(Object... args)
wait for the given visual to appear within the given wait time
args [String|Pattern|Double, [Double, [Float]]] (max 3 args) arg1: String/Pattern to search or double time to wait (rest ignored) arg2: time to wait in seconds arg3: minimum similarity to use for search (overwrites Pattern setting) |
static boolean |
waitVanish(Object... args)
wait for the given visual to vanish within the given wait time
|
static boolean |
write(Object... args)
just doing a currentRegion.write(text) (see write())
|
public static boolean isNashorn()
public static Object call(String function, Object... args)
function
- the function's nameargs
- the parameterspublic static Region use(Object... args)
args
- public static Region use1(Object... args)
args
- see use()public static void restoreUsed()
public static Match wait(Object... args) throws FindFailed
args
- FindFailed
public static boolean waitVanish(Object... args)
args
- see wait()public static Match exists(Object... args)
args
- see wait()public static Location hover(Object... args)
args
- public static Location click(Object... args)
args
- see hover()public static Location doubleClick(Object... args)
args
- see hover()public static Location rightClick(Object... args)
args
- see hover()public static boolean paste(Object... args)
args
- only one parameter being a Stringpublic static boolean write(Object... args)
args
- only one parameter being a Stringpublic static boolean isJSON(Object aObj)
aObj
- public static Object fromJSON(Object aObj)
aObj
- Copyright © 2017. All rights reserved.