There are following system functions defined:
- static function activeWindowCoordinates()
Active window (focus owner) coordinates relative to top left position of main monitor and size. Returned value is area typed (x, y, width, height)
- static function cursorPosition()
Mouse cursor position relative to top left position of main monitor
- static function getValue(index)
Gets the value of the given name from the memory (this is the dynamic alternative for static field variable calls)
- index - array index of the object to return (starting from 0)
- static function createImage(width, height)
Creates the new image object
- width - width of the image
- height - height of the image
- static function captionImage(text, fontName, fontSize, fontStyle, color)
Draws the text on the image with transparent background
- text - text to paint
- fontName - name of the font to draw the string (family name, case sensitive)
- fontSize - size of the text
- fontStyle - Font style - 0 to use default style.
- color - Color of the text - HTML (hexadecimal) format like FFFFFF
- static function activeWindowTitle()
Active window (focus owner) title
- static function screenSize()
Whole screen (including all screen devices) size
- static function BOLD()
Bold font style constant
- static function compareImages(image1, image2)
Calculate the area of the images that differs
- image1 - First image to compare
- image2 - Second image to compare
- static function screenArea()
Returns the area of the screen - the size and the coordinates of top left corner
- static function concat(area1, area2)
new object - intersection of two areas
- area1 - First area to concatenate
- area2 - Second area to concatenate
- static function popFirst(arrayName)
Pops the first element from array shifting all remaining items one step left. Result (one element shorter array) is stored in memory under given variable name. Returns popped element.
- arrayName - Variable name of the array
- static function popLast(arrayName)
Pops the last element from array. Result (one element shorter array) is stored in memory under given variable name. Returns popped element.
- arrayName - Variable name of the array
- static function pop(arrayName, index)
Pops the given indexed element from array shifting all remaining items one step left. Result (one element shorter array) is stored in memory under given variable name. Returns popped element.
- arrayName - Variable name of the array
- index - Index of the element to pop
- static function getClipboard()
Returns clipboard value - Image, integer, boolean or string
- static function readImage(url)
Loads image from given file or url
- url - Url or path (either relative or full) of the image file
- static function color(htmlColor)
Creates color object
- htmlColor - HTML format (like 0xFFFFFF) of color to create
- static function color(red, green, blue)
Creates color object
- red - Value of red color (0-255)
- green - Value of green color (0-255)
- blue - Value of blue color (0-255)
- static function getColorArea(image, startPoint)
Calculates area of given color object - searches the pixels maximum to the left, top, right, bottom, that are connected to the given one
- image - Image, where to check the area size (the coordinates of area are relative to image (0,0) position
- startPoint - Starting pixel coordinates
- static function getBackgroundColor(image, area)
Calculates the background color of the object (the color that most of the pixel have)
- image - Image where to check the background color
- area - Area on the image, where to check the coordinates
- static function getBackgroundColor(image)
Calculates the background color of the object (the color that most of the pixel have)
- image - Image where to check the background color
- static function activeWindow()
Current active window object (pointer).
- static function getActiveJavaWindow()
Current Java active window pointer. Null if none is active.
- static function callJavaStaticFunction(ClassName, Function, Args)
Calls the static function over the given class. Returns returned value or null if fuction returns void
- ClassName - Name of the class
- Function - Name of the function to be executed
- Args - Array of arguments
- static function callJavaFunction(object, Function, Args)
Calls the function over given object. Returns returned value or null if function returns void
- object - Object, over that the function will be called
- Function - Name of the function to be executed
- Args - Array of arguments
- static function variableExisists(variableName, globalOnly)
Returns true if the variable is declared
- variableName - Name of the variable
- globalOnly - True for global variable only, false for global variable or current Procedure call variable
- static function createScreenshot(area)
Create the screenshot
- static function getWindowWithTitlePrefix(titlePrefix)
Gets the pointer to the any application window, that starts with given text
- titlePrefix - Text prefix of the searched window
- static function getSystemProperty(propertyName)
System value. See Java call: System.getProperty(String)
- propertyName - Name of the property to get
- static function isImage(object)
Returns true if given object is the image
- object - Object to be checked, if it's a image
- static function abs(value)
Calculates area of given color object - searches the pixels maximum to the left, top, right, bottom, that are connected to the given one
- value - Image, where to check the area size (the coordinates of area are relative to image (0,0) position
- static function createMap(mapArrayDefinition)
Calculates area of given color object - searches the pixels maximum to the left, top, right, bottom, that are connected to the given one
- mapArrayDefinition - Image, where to check the area size (the coordinates of area are relative to image (0,0) position
krzys
2017-07-19