CheckBox()
Add checkbox to dialog view
Add checkbox to dialog view
Will return the current checkbox view id
Will return the current checkbox text
Will return the current checkbox text size
Useful to parameterize click event
Will return the delay of click
This method return the number of click duration in milliseconds
Will return the offset of click representing in Point
You can set delay in milliseconds of click using this method
This method is used to set hold long the click lasts in miliseconds
When match or coordinate is set, the position of click will be offset based on x and y coordinate
Copy a string into the system clipboard.
Paste the current clipboard text into the focused input field.
Read the current clipboard text.
Utility class to perform color similarity
Extracts the blue color value from a hex color string.
Compare both color and get the similarity score
Will return hexadecimal string color
Extracts the green color value from a hex color string.
Check if both color is has similarity to 1
Extracts the red color value from a hex color string.
Add Column view to dialog
Will return the id of column view
Utility class to perform datetime calculations
Adds a specified amount of time to the DateTime object.
Returns the day of the month of the DateTime object.
Sets the day of the month of the DateTime object.
Returns the day of the week of the DateTime object. (Sunday is 0, Monday is 1, etc.).
Calculates the difference between the current DateTime object and another DateTime object.
Sets the DateTime object to the end of a specified unit of time (e.g., end of the day, end of the month).
Returns the formatted date as a string.
Returns the hour of the day of the DateTime object. (24-hour format, 0-23).
Sets the hour of the day of the DateTime object. (24-hour format, 0-23).
Checks if the current DateTime object is after another DateTime object.
Checks if the current DateTime object is before another DateTime object.
Checks if the current DateTime object is between two other DateTime objects (inclusive).
Checks if the current DateTime object is the same as another DateTime object.
Checks if the current DateTime object is the same as or after another DateTime object.
Checks if the current DateTime object is the same as or before another DateTime object.
Converts the DateTime object's timezone to the system's default local timezone.
Returns the millisecond of the second of the DateTime object.
Sets the millisecond of the second of the DateTime object.
Returns the minute of the hour of the DateTime object.
Sets the minute of the hour of the DateTime object.
Returns the month of the DateTime object. (1-based, January is 1).
Sets the month of the DateTime object. (1-based, January is 1).
Returns the second of the minute of the DateTime object.
Sets the second of the minute of the DateTime object.
Sets the DateTime object to the start of a specified unit of time (e.g., start of the day, start of the month).
Subtracts a specified amount of time from the DateTime object.
Returns the ISO 8601 formatted date string (e.g., "1970-01-01T0000.000Z").
Sets the DateTime object's timezone to a specified timezone ID.
Returns the Unix timestamp (seconds since Unix epoch) of the DateTime object.
Converts the DateTime object's timezone to UTC.
Returns the primitive value of the DateTime object, which is the number of milliseconds since the Unix epoch.
Sets the year of the DateTime object.
Returns the year of the DateTime object.
Adds a question, a piece of text or a container to the dialog. They show in the order you add them.
Returns the answer to the question with this id.
This method is useful to get the value of EditText, CheckBox, RadioGroup
To start using and displaying the dialog, this method is required to initialize the dialog
Remove view from dialog view based on it's id
Add body content text to the dialog view
Add title to the dialog view
Shows the dialog and waits until the user presses OK.
Shows the dialog only when a question still needs an answer. Otherwise it returns straight away, and the macro uses the saved answers.
Add EditText to dialog view
Will return the hint text of EditText
Will return the color text
Will return the text size of EditText
Useful to parameterize search detection
Will return the delay of detection
Get the current detection engine ID
Will return the detection method
Will return the detection type which is IMAGE or TEXT in string
Get the highlight duration
Check if highlight tooltip is enabled
Will return the detection score threshold
Check if dynamic scaling is enabled
This method return boolean indicating the image/text search will be performed in grayscale
Will return boolean whether detection will be highlighted or not
You can set image/text search delay in milliseconds using this method
Set the underlying detection engine ID
Modify the detection algorithm
Modify the detection behaviour which is IMAGE or TEXT in string. By default IMAGE is used
Set whether to use dynamic scaling during detection (useful for multiscreen support)
Set whether to use grayscale conversion for detection
This parameter will tell the macro to show the highlight of the detection in your device screen
Set the duration of the highlight in milliseconds
Set whether to show a tooltip with the highlight
Set the threshold score for image and text recognition
The user plays a routine once on their own screen. Every tap, hold and swipe is recorded and passed on to the app, so they can play normally. The answer is a record name for Record:play().
The opposite of showWhen(): hides an item while a checkbox is ticked, or while an option is chosen. So it shows while the checkbox is not ticked, or while any other option is chosen.
Useful module to type text into your device screen
This method will simulate keyboard typing to your screen, but only works on any text input not working in some apps
Get the list of your existing macro
An extension module for calling or executing your macro programatically at runtime
Execute your macro using block executor
Execute your macro using code executor
Get the xml block of the coresponding macro
Get the code of the coresponding macro
Get the id of the coresponding macro
Get the name of the coresponding macro
Returns the X coordinate of the center point of the matched region.
Returns the Y coordinate of the center point of the matched region.
Returns the center point of the matched region as a Point object.
Returns the matched region as a Region object.
Returns the confidence score of the match.
Returns the label or text associated with the match.
Returns the X coordinate of the top-left corner of the matched region.
Returns the Y coordinate of the top-left corner of the matched region.
A field that only takes a number. The answer is a number.
Keeps the number between two values. The field shows the range, and OK waits for a number in it.
One page of a long dialog. The first time, the user answers the pages one at a time with Next and Back; once everything is answered, the pages show as tabs.
Coordinate of x and y in screen
Will return the x coordinate
Will return the y coordinate
Modify the x coordinate
Modify the y coordinate
Add Radio button to dialog view
Will return the button id
Will return the text of radio button
Add radio group to dialog view, each child view contains Radio Button
Add radio button to the group
Will return the list of radio buttons
Will return the view id
Shows the options as a dropdown instead of round buttons. Better for long lists. The answer is still the id of the chosen RadioButton.
Useful module to replay your gestures/touches
Plays a touch record: one you recorded, or one a user recorded in a dialog's GestureRecorder.
The core module for detecting and performing ui automation in a region of interest which is a part of screen device
To perform parameterize click behaviour using MatchResult
To perform image/text detection and click it's match coordinate in bulk manner
To check if match exist in the region, if match is found then this method returns true else false
To perform image/text detection and click it's match coordinate, if match is found then this method returns true
To perform image/text detection and click it's match coordinate, if match is found then this method returns true
To perform image or text search in the region, if the image or text is found return the MatchResult else return nil
To perform image or text search in bulk manner and return a list of MatchResult
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
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
This method performs OCR in region of interest and return the concatenated text
Get all text matches found in the region properly formatted
Get the x coordinate of region
Get the y coordinate of region
Get the height of region
Use for highlighting the region
Perform up to 10 fingers swipe simultaneously within the region. Each finger operates on its own independent timeline.
Take a screenshot of region and save it to /data/data/com.androidmacro/images/$macroId/$fileName
Perform a single-finger swipe within the region.
Wait until template appear in the region, if timeout reached this method will throw an error
Wait for an image/text to appear and then click it
Wait until template disappear or vanish in the region, if timeout reached this method will throw an error
Get the width of region
A module for performing network request to the internet that was introduced on version 1.0.0.31
Execute a DELETE request and return a Response object. This method is used to delete a resource from a server.
Execute a GET request and return a Response object. This method is used to retrieve data from a specified URL.
Execute a PATCH request and return a Response object. This method is used to partially update a resource on a server.
Execute a POST request and return a Response object. This method is used to send data to a server, typically to create a new resource.
Execute a PUT request and return a Response object. This method is used to completely replace a resource on a server.
Set a new header for HTTP requests. This method allows you to add custom HTTP headers to your request before sending it.
Set a parameter for the request body (used with POST/PUT/PATCH requests). This method allows you to add data that will be sent in the request body.
The Response object contains the result of an HTTP request made with the Request module. It provides access to the response data, status code, and other metadata returned by the server.
Get the response body content as a string from the HTTP response.
Get the HTTP status code from the response.
Add Row view to dialog
Will return the id of row view
The module has similar functionality with Region module, except it uses full device width and height
To perform parameterize click behaviour using MatchResult
To perform image/text detection and click it's match coordinate in bulk manner
To check if match exist in device screen, if match is found then this method returns true else false
To perform image/text detection and click it's match coordinate, if match is found then this method returns true
To perform image/text detection and click it's match coordinate, if match is found then this method returns true
To perform image or text search in your device screen, if the image or text is found return the MatchResult else return nil
To perform image or text search in bulk manner and return a list of MatchResult
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
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
This method performs OCR in device screen and return the concatenated text
Get the x coordinate of screen
Get the y coordinate of screen
Get the height of screen
Use for highlighting the screen
Perform up to 10 fingers swipe simultaneously to the screen. Each finger operates on its own independent timeline — touching down, moving, holding, and lifting according to its own parameters.
Take a screenshot the entire device screen and save it to /data/data/com.androidmacro/images/$macroId/$fileName
Perform a single-finger swipe on the screen. The swipe path is defined by a list of SwipePoint values that the finger moves through sequentially.
Wait until template appear in the screen, if timeout reached this method will throw an error
Wait until template disappear or vanish in the screen, if timeout reached this method will throw an error
Get the width of screen
Get all text matches found on the screen properly formatted
Wait for an image/text to appear on the screen and then click it
A titled group of questions the user can fold, such as "Advanced".
Adds a small line of help under an item. Every dialog item has it.
Chooses whether OK waits for an answer to this question. It is on NumberInput, Slider, TapPicker, TapListPicker and GestureRecorder.
Useful to modify macro settings & optimization
When this option is set to off, the macro will not use cache image frame
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
Will return delay of click in currently running macro
Will return the current path of macro image directory
Will return the minimum match score as threshold when you perform text or image detection
Will return the delay of text or image detection in currently running macro
Will return delay of swipe in currently running macro
When this option is set to off, the text or image detection will be processed in normal mode
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
Check if text or image detection is processed in grayscale mode
Change the entire click delay in currently running macro
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
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
Change the minimum threshold score when performing text or image detection
Add delay when you perform text or image detection
Change the entire swipe delay in currently running macro
Shows a question, text or container only while a checkbox is ticked, or while an option is chosen. Every dialog item has it.
The user slides to a number between two values. The label shows the current number. The answer is a number.
Makes the slider move in steps, such as 0, 50, 100.
Append data to an existing stored value.
Delete a stored value by key.
Read a stored value by key.
Store a value using a string key.
Useful to parameterize swipe events
Will return the delay of each swipe points
Return true if swipe points are continuous
You can set whether each swipe point is continuous, which means the swiping finger does not lift up.
You can set swipe delay in milliseconds using this method
Represents a point in a swipe path. Used with ScreenmultiSwipe() to define where the finger moves, how fast, and how long it pauses.
Will return swipe point hold duration
Will return swipe point speed. This method won't work after version 1.0.0.16
Will return swipe point duration
Will return swipe point x coordinate
Will return swipe point y coordinate
Change the hold duration of swipe point
Change the speed of swipe point. This method won't work after version 1.0.0.16
Change the duration of swipe point
Change the x coordinate of swipe point
Change the y coordinate of swipe point
Utility class to press system button
Press back button
Press home button
Press recent button
Press recent button
The user taps several spots on their own screen, in order. Each marker shows its number and can be dragged. The answer is a list of Points.
The user taps a spot on their own screen, then drags the marker to fine-tune it. The answer is a Point.
Add TextView to the dialog view
Get text content
Useful to parameterize toast messages
Will return the duration of the toast
Will return the current opacity level
Will return the current padding as an array of numbers [left, top, right, bottom]
Will return the current position of the toast as a Point object
Will return the current corner radius
Will return the current text color string
You can set how long the toast is visible in milliseconds
You can set the transparency level of the toast using this method (0.0 to 1.0)
You can set custom padding for the toast content
You can set the position of the toast on the screen using x and y coordinates
You can set the corner radius of the toast background
You can set the text color of the toast (e.g., "#FF0000" or "#AARRGGBB")
Utility module for controlling the floating Android Macro toolbar from Lua.
Get the current toolbar opacity.
Get the current toolbar scale factor.
Hide the floating toolbar.
Check whether the floating toolbar service is available.
Check whether the toolbar is currently in a snapped state.
Check whether the toolbar is currently visible on screen.
Enable or disable collapsed circle mode for the toolbar.
Set the toolbar opacity.
Move the floating toolbar to a specific screen position.
Set the toolbar scale factor.
Enable or disable edge snap mode for the toolbar.
Show the floating toolbar.
Interface for handling touch interactions on Android devices.
Dispatches all pending touch events to the system. This method is useful when you want to ensure all touch events are processed immediately.
Performs a touch down action at the specified coordinates or point.
Exits and cleans up the touch interface. This method should be called when you're done using the touch interface.
Initializes the touch interface. This method must be called before using any other touch methods.
Performs a touch move action to the specified coordinates or point.
Performs a touch up action, releasing the touch at the current position.
Utility class to show toast, alert, sleep and more
Show alert to the screen
Generate a list of points between start and end
Add sleep to the macro
Show toast to the screen