Skip to main content

143 docs tagged with "Reference"

View all tags

Color()

Utility class to perform color similarity

Dialog

Utility class to show dialog popup into screen, useful to parameterize your macro

Dialog:add()

Add view to the dialog, currently you can only add view based on this parameter

Dialog:getValueById()

This method is useful to get the value of EditText, CheckBox, RadioGroup based on id

Dialog:init()

To start using and displaying the dialog, this method is required to initialize the dialog

Dialog:show()

If you invoke this function the dialog will popup in the screen

Keyboard

Useful module to type text into your device screen

Keyboard:type()

This method will simulate keyboard typing to your screen, but only works on any text input not working in some apps

Point()

Coordinate of x and y in screen

RadioGroup()

Add radio group to dialog view, each child view contains Radio Button

Record

Useful module to replay your gestures/touches

Region()

The core module for detecting and performing ui automation in a region of interest which is a part of screen device

Region():clickAll()

To perform image/text detection and click it's match coordinate in bulk manner

Region():exist()

To check if match exist in the region, if match is found then this method returns true else false

Region():existClick()

To perform image/text detection and click it's match coordinate, if match is found then this method returns true

Region():existClickAll()

To perform image/text detection and click it's match coordinate, if match is found then this method returns true

Region():find()

To perform image or text search in the region, if the image or text is found return the MatchResult else return nil

Region():findAll()

To perform image or text search in bulk manner and return a list of MatchResult

Region():getColor()

To get color pixel in certain coordinate, later this color can be used to compare if color has similar score, this is useful to do color detection

Region():getColors()

To get color pixel in multiple coordinates at the same time, later these colors can be used to compare if color has similar score, this is useful to do color detection

Region():getText()

This method performs OCR in region of interest and return the concatenated text

Region():screenshot()

Take a screenshot of region and save it to /data/data/com.androidmacro/images/$macroId/$fileName

Region():wait()

Wait until template appear in the region, if timeout reached this method will throw an error

Region():waitVanish()

Wait until template disappear or vanish in the region, if timeout reached this method will throw an error

Row()

Add Row view to dialog

Screen

The module has similar functionality with Region module, except it uses full device width and height

Screen:click()

To perform parameterize click behaviour using MatchResult

Screen:clickAll()

To perform image/text detection and click it's match coordinate in bulk manner

Screen:exist()

To check if match exist in device screen, if match is found then this method returns true else false

Screen:existClick()

To perform image/text detection and click it's match coordinate, if match is found then this method returns true

Screen:existClickAll()

To perform image/text detection and click it's match coordinate, if match is found then this method returns true

Screen:find()

To perform image or text search in your device screen, if the image or text is found return the MatchResult else return nil

Screen:findAll()

To perform image or text search in bulk manner and return a list of MatchResult

Screen:getColor()

To get color pixel in certain coordinate, later this color can be used to compare if color has similar score, this is useful to do color detection

Screen:getColors()

To get color pixel in multiple coordinates at the same time, later these colors can be used to compare if color has similar score, this is useful to do color detection

Screen:getText()

This method performs OCR in device screen and return the concatenated text

Screen:screenshot()

Take a screenshot the entire device screen and save it to /data/data/com.androidmacro/images/$macroId/$fileName

Screen:wait()

Wait until template appear in the screen, if timeout reached this method will throw an error

Screen:waitVanish()

Wait until template disappear or vanish in the screen, if timeout reached this method will throw an error

Settings

Useful to modify macro settings & optimization

Settings:cacheOn()

When this option is set to on, the macro will store a temporary cache to store last frame, normally your macro will capture the screen device every time frame is available, this is an intensive operation so in order to prevent that you can use this options

Settings:getMinScore()

Will return the minimum match score as threshold when you perform text or image detection

Settings:grayscaleOff()

When this option is set to off, the text or image detection will be processed in normal mode

Settings:grayscaleOn()

When this option is set to on, the text or image detection will be processed in grayscale mode, this is useful to speed up the detection process

Settings:setComparisonHeight()

Change the comparison height, this comparison height is a variable or constant that the Android Macro used to calculate screen resolution between 2 devices with the same aspect ratio

Settings:setComparisonWidth()

Change the comparison width, this comparison width is a variable or constant that the Android Macro used to calculate screen resolution between 2 devices with the same aspect ratio

Settings:width()

When this option is set to off, the macro will not use cache image frame

System

Utility class to press system button

Utils

Utility class to show toast, alert, sleep and more