Action - Control UI

The action Control UI uses the accessibility features of the device to control the user interface and allows to automatically press buttons, long-click elements, scroll lists and change the values of checkboxes and radio buttons.

Note: This action controls the user interface by simulating user input, therefore the screen has to be active, unlocked and the user interface must be showing on screen.
The accessibility service of Automagic needs to be enabled in the preferences for this action to work. At least Android 4.1 (Jelly Bean) is required.

Note: Turning on the accessibility service is not possible on some devices when a screen brightness or screen filter app displays an overlay over other controls. Please disable such apps temporarily when pressing the OK button in system settings is not possible.

 

Examples:
  • Start the location settings page and enable/disable GPS.
  • Start the device update check by pressing the "Check now" button.
Settings
Script
Defines the actions to execute.
See action Script for a description of the basic features of the scripting language.

Warning: The following example scripts are highly device specific! Please only use the scripts for reference and don't just copy/paste the scripts. It might click the wrong control elements on your device.

Clear all notifications:
notifications();//to expand the notifications
sleep(1000);//wait one second for animations to complete
clicked = click("Clear all notifications");//click the button
if(not clicked) //check whether the button has been successfully clicked
{
    back();//hide the notification when the clear button was not available
}
        
Toggle GPS on/off:
Use an action Launch App: Settings/Location services to directly start the GPS settings page
sleep(1000);//wait for settings page to show
click("GPS satellites");//toggle setting on/off
sleep(500);
back();//go back to the previous screen
        
Open the Apps drawer:
home();//ensure the main home screen is showing
sleep(1000);//wait one second for animations to complete
click("Apps");//open the apps drawer
        
Supported Functions