Instructions for App and Console Configuration
The Automation and Remote Control (henceforth ARC) app allows an Android device to send various configurable commands to a PC. For example, if the user needs to type the same text again and again, such as the date, or a company name, or an address, ARC can be programmed with a macro to automate this. Likewise, if the user frequently has to manipulate applications such as spreadsheets or calendars in a repetitive fashion, these tasks can be reduced to a single button click.
App Installation
The app can be installed through the Google Play App store.

Console Installation
The Automation and Remote Control application is a necessary program that communicates with ARC to provide functionality and configuration options. The Windows installer can be downloaded here:

Once the application is installed, it should run automatically at startup. To launch the configuration console, click on its icon in the Windows notification area:

The platform-independent version can be downloaded here, and can be launched as shown in the following Linux console.

App Instructions
Connecting the Android Device to the Console
At first, the app and console will not be able to communicate, and the console will inform you of this with a message similar to the "No connection" error displayed here:

In this case, the Android app needs to connect using the IP The App can find this by using the "Auto Scan for Server" button or, if that doesn't succeed, by the user manually typing it into the app's "Change IP Manually" textbox. The password and port can generally be ignored. See Advanced for more information.

Console Instructions
Basic Setup
The user may change the number of buttons and their colors as follows:
  • Number of Buttons
    The number of buttons may be changed using the dropdown list labeled "Total Items". The default is two.
  • Automatic Button Colors
    Various automatic color schemes are available in the dropdown list labeled "Auto Colors". The default is "Random".
  • Manual Button Colors
    When a button is clicked, the other buttons will turn dark and the configuration options for the selected button appear. After pressing the "Advanced" button, the color, size, and position of the button can be set.
Basic Macros
Basic macros allow the user to type numerous keystrokes with a single keystroke. A typical use would be an address, a company name, the current date, or anything else that needs to be frequently typed. An example follows:

1. To set up a macro, click on the desired button. In the above picture, the top button has been selected.
2. Select "Macro" from the "Type" dropdown box.
3. Enter the desired text.
4. If desired, click "New" to add another Macro for the same button. These can be selected on the Android device by dragging the button.

Simple Key Bindings
In addition to normal text sequences, a number of special tags may be used. The first set of special keys are straightforward and correspond to keys on most keyboards.
  • [esc]
    The escape key.
  • [print scrn]
    The print screen key.
  • [pause-key]
    The Pause key.
  • [backspace]
    The Backspace key.
  • [enter]
    The Enter key.
  • [newline]
    The new line character. This is similar to [enter] but can be different depending on the system.
  • [insert]
    The Insert key.
  • [home]
    The Home key.
  • [end]
    The End key.
  • [pageup]
    The Page Up key.
  • [pagedown]
    The Page Down key.
  • [delete]
    The Delete key.
  • [tab]
    The Tab key.
  • [openbrace]
    The open brace key: [
  • [closedbrace]
    The closed brace key: ]
  • [colon]
    The colon key. This may be needed in rare cases, as the [skip-to] tags require the use of the actual colon character on labels.
  • [f1]
    , etc, through
    The function keys, F1 through F24.
Advanced Keyboard Controls
In addition to normal text sequences, a number of special tags may be used. The first set of special keys are straightforward and correspond to keys on most keyboards.
  • [ctrl]
    , and
    Simulate the respective "ctrl", "alt", and "windows" keys. They each work in the same manner. For example, to simulate ctrl-v enter:
  • [shift]
    Simulates the "shift" key. While this can be used to capitalize a sequence of letters:
    [shift]this will be written in capital letters[-shift] is more typically used in combination with other keys. For example, this will open the Windows task manager (ctrl-shift-esc):
  • [cursor]
    Moves the cursor, thus simulating the arrow keys. The following command will move the cursor 5 times to the right, 2 times up, 2 times down, and 3 times to the left.
    [cursor]right 5, up 2, down 2, left 3[-cursor]
  • [keypress] and [keyunpress]
    The [keypress] tag simulates holding down the specified keys, while [keyunpress] releases the same. Notice that there is a 10 second shutoff for [keypress] to prevent accidentally locking up the system. If more than 10 seconds is required, multiple instances, or the use of a [loop] tag is needed.

    In the following example, the letters "abc" are repeated over and over for two seconds. There is no guarantee regarding the order of the letters.
  • [unpressall]
    Unpresses all keys being pressed with [keypress].
  • [typingdelay]
    The number of milliseconds to pause before each keystroke occurs. This does not apply to [keypress]. In the following example, the characters "1234567890" will take a total of five seconds to be typed.
Mouse Controls
  • [leftclick], [rightclick], [middleclick]
    Full clicks of the corresponding mouse buttons.

  • [leftdown], [rightdown], [middledown]
    The press (without release) of the corresponding mouse buttons.

  • [leftup], [rightup], [middleup]
    The release of the corresponding mouse buttons.

  • [mouse]
    Controls the mouse pointer. It can be used to move the pointer to a particular part of the screen, using either percentages of the screen dimensions, or pixels. The following will move the pointer to the middle of the screen:
    [mouse]move-to 50%/50%[-mouse]
    The following will move the mouse pointer to the position 200 pixels from the left of the screen, and 25 pixels from the top:
    [mouse]move-to 200px/25px[-mouse]
    The mouse tag can also move the pointer to a position relative to its current position. The following command will move 25 pixels to the right, then 25 pixels toward the bottom.
    [mouse]move 25px/0px, move 0px/25px[-mouse]
    To perform delays after each move, use the following format. In this example the mouse will move, then pause 1000 milliseconds.
    [mouse]move-delay-1000 155px/25px[-mouse]
    The mouse tag can also be used to perform clicks, presses, and releases, thereby facilitating drags and highlighting. The following performs all of the available button functions, with "l", "m", and "r" corresponding to the left, middle, and right buttons; and "c", "d", and "u" corresponding to clicking, pressing down, and releasing.
  • [mousedelay]
    This defines the default pause after each mouse move. Use of the "mouse-delay-1000" format will override this. In the following example, the first two moves will pause 1000 milliseconds, and the third move will not pause at all.
    [mouse]move 100px/0px, move 0px/100px, move-delay-0 100px/100px[-mouse]
  • [mousedelta]
    Alters the x/y coordinates given to the [mouse] tag. In the following example, the [mouse] tag will move to the 300px/450px position, since x and y are being incremented by 200 and 300 respectively.
    [mouse]move-to 100px/150px[-mouse]
  • [date]
    Outputs the current date. A date similar in format to 2021-06-13 20-23-09 will be outputted with the default command:
    The custom format specifications can be found online. As an example, the following will output a date similar to Jun 13, 2021:
    [date]MMM dd, yyyy[-date]
  • [setdate]
    Overrides the system clock. (Note that it does not set the system clock.) The date formats in the following example are acceptable. The last is the number of milliseconds from January 1, 1970, 00:00:00 GMT.
    [setdate]2009-01-15 18-55-42[-setdate]
  • [clearsetdate]
    Clears [setdate]. Any subsequent use of [date] will reference the system clock.
  • [noop]
    Short for no-operation. It does nothing. Useful as a placeholder during certain kinds of testing.
  • [run]
    Runs a program. In the following example, firefox will be run, assuming the path is correct.
    [run]C:\Program Files (x86)\Mozilla Firefox\firefox.exe[-run]
  • [command]
    Runs a command as if from the command prompt. The following example will copy a file.
    [command]copy c:\temp\source.txt c:\temp\dest.txt[-command]
  • [popup-message]
    Pops up a message.
  • [beep]
    Performs the system beep.
  • [onexit]
    Designates the enclosed text to be run when the macro finishes. This will run even when an error occurs, or when the [stop] tag is used.
    [popup-message] Finished! [-popup-message]
App Behavior Commands
  • [ignorenewlines]
    This will ignore the line breaks in subsequent text. This is important when the associated macro is intended for automation rather than outputting blocks of text. The following example will write the date three times with newlines following each instance, and then three times on the same line.
  • [enablenewlines]
    This reverses [ignorenewlines]
  • [load]
    Loads a file into the current macro. In the following example, the contents of body_of_text.txt runs in between "Header Information" and "Footer Information".
    Header Information
    Footer Information
  • [lib]
    Defines the directory for all [load] tags. The following example works exactly as the previous. Notice that if this is not defined, or if the file is not otherwise found, the application will also attempt to find any [load] tag's file by looking in the directory of the configuration file.
    Header Information
    Footer Information
  • [delay]
    Causes a delay for a specified number of milliseconds. The following will output the word 'start', then pause for 2.5 seconds, then output the word 'end':
    start [delay]2500[-delay] end
  • [cursordelay]
    For any subsequent [cursor] commands, [cursordelay] will pause a given number of milliseconds for each cursor movement. In the following example, the cursor will move right five times, then left two times, and take seven seconds to complete.
    [cursor]right 5, left 2[-cursor]
  • [tagdelay]
    After any tag is executed, this will pause for a given number of milliseconds. The following will take four seconds to execute.
  • [newlinedelay]
    Delays the given number of milliseconds for every newline (enter key) encountered.
  • [defaultdelay]
    Works the same as [tagdelay] and [newlinedelay]. Notice that this will make the following example take eight seconds to complete: Four seconds for the tags, and four seconds for the newlines.
  • [delaymultiplier]
    Multiplies all other delays by the given amount. The following example will take 6 seconds to complete.
  • [title]
    The default button contains the text from the configuration. Using the [title] tag, the button can contain custom text. The following example will override the text to "Restart Server".
    [title]Restart Server[-title]
  • [exit]
    Stops execution of the macro. In the following example only "First Line" is outputted.
    First Line
    Third Line
  • [prompt-pause]
    Makes a popup and pauses execution until the user presses the "Okay" button.
  • [stop]
    Stops the currently running macro. This contrasts to [exit] in that it causes a different macro to stop. If a configuration has one or more long-running macros, it is a good idea for one of the buttons to consist only of a [stop], so that any process that goes awry can be forced to quit. It cannot be used with any other characters preceding it.
  • [pause]
    Pauses the current running macro.
  • [unpause]
    Unpauses the current paused macro. It cannot be used with any other characters preceding it.
  • [pause/unpause]
    Pauses the current running macro, and then unpauses it on a second press. It cannot be used with any other characters preceding it.
  • [disable]
    Disables the given tag. In the following example, the user sees the first popup, but not the second.
  • [enable]
    Enables the given tag. In the following example, the user will see both the first and second popups.
  • [target]
    Sets the destination of output to a file, or to the keyboard. Keyboard is the default setting.

    In the first example, all of the output will go to the file "c:\data\output.txt". Note that in this example, the file will be cleared prior to being written to. In the second, the output will be appended instead. In the third example, the default keyboard output will be resumed after writing to the file.
    This will be written to a file.
    This will be appended to a file.
    This will be written to a file.
    This will be shown on the screen, as usual.
  • [multiclick]
    Defines how the app behaves when a button is clicked while already running. The options are as follows:
    , which disregards any clicks while running; and
    , as in the example, which queues multiple clicks to run one after the other. Consecutive is the default.
  • [tags-with-newlines]
    This defines which tags will be followed by a newline, when they are followed by a new line in the macro. By default, only [date] and [varout] are configured this way. The following example is equivilent to the default setting:
  • [id]
    Sets the ID of the tag. This is used mainly with the [page] tag. It can be any text.
    [id]Button #1[-id]
  • [page]
    Moves the given buttons a given number of pages. The following example will move all buttons that have multiple pages 1.
    The second example will move the button with the id "Button #1" back a single page. In addition, the "flip" variable is set to false. This will prevent, for example, a button going from page 1 to page 3 (out of three). The default setting of "flip" is true.
    [page]button=Button #1,delta=-1,flip=false[-page]
    The last example sets the button to a specific page.
    [page]button=Button #1,set=2[-page]
    Note that when a macro uses a [page] tag, no other functionality can be used with it.
Loops, Controls, and Variables
These tags provide some programming-like features. Notice that advanced users may prefer the Java Integration features instead.
  • [loop]
    Repeats a sequence of text a specified number of times. If a zero (0) is indicated, the loop will run infinitely, until an error occurs or [stop] command is sent. For example, the following will output
    The word 'repeated' is repeatedrepeatedrepeated three times
    The word 'repeated' is [loop] 3 repeated[-loop] three times
  • [loopdelay]
    For any subsequent [loop] commands, [loopdelay] will pause a given number of milliseconds each iteration. The following example will take five seconds to complete.
    [loop] 5
  • [skip-to] and [label]
    The [skip-to] tag moves the process to wherever the specified label is located.
    This line is NOT written.
    This line IS written.
  • [options]
    Prompts the with a number of options. The options are defined with a word or phrase that end in a colon. The text that follows the selected option is then processed. The option window can be configured with the following special option:
    • pre:
      This is text that is processed for every subsequent option before any of that option's specific text.
    • post:
      This is text that is processed for every subsequent option after any of that option's specific text.
    • always-on-top:
      This forces the window to be on top of any others.
    • position:
      This sets the position of the window. The default is in the middle of the screen.
    • disable-hot-keys:
      This disables the hotkeys (F1, F2, etc).
    The following example shows several options as well as several configuration options.
    This text will be written first.

    This text will be written last.


    Write The Date:

    Run Test One:

    Run Test Two:

    Exit Application:

  • [varset]
    Sets a variable. The name of the variable must begin with a letter or underscore, and the rest of the variable must consist of letters, numbers, or underscores. In the following example, the variable "Name" is set to "Value".
  • [varset-if-empty]
    Works just as [varset] but only actually sets the variable if it hasn't been already. This is typically used when a variable is expected to be set from the cache of previous processes when that macro is run for the first time.
  • [varout]
    Outputs a variable. In the following example, the output will be "Value".
  • [varset-from-var]
    Sets a variable to another variable. In the following example, the output is "Value".
  • [varquery]
    Creates an input box allowing the user to set the query. In the following example, the user is requested to set the "Name" variable, and that value is then outputted.
  • [varmod]
    For numeric variables, adds or subtracts a value. In the following example, the number 15 will be outputted.
  • [varclear]
    Clears a variable.
  • global, common, normal
    Defines the scope of the variable. A global variable is available to all configurations. A common variable is available to all buttons of the same configuration. A normal variable is only available to the button in which it is defined. The follow example shows each. Note that 'normal' is the default scope.
  • [default-var-option]
    Changes the default scope. In the following example, the default is changed to global.
  • [def] and [defout]
    Similar to [varset], [def] allows any text including other macros. It is not cached and so must be defined in every macro in which it is used. It is best to keep commonly used [def] instances in a file that can be reused by different macros with [load]. In the following example a letter template is outputted, and the cursor is placed in the empty body.
    [date]MMM dd, YYYY[-date]
    ACME Corp
    444 Industrial Way,
    Chicago, IL

    [varout]username[-varout][cursor]up 3[-cursor]

    [varset]username,John Doe[-varset]
Java Integration
This allows using Java code from a macro. The user should have a basic command of the Java programming language.
  • [java]
    Used in a minimal way, any code between the [java] tags is inserted in the main(String args[]) method. In the default configuration, all text that goes to System.out will be outputted as macro text. So this example...
    System.out.println("Hello World!");
    [-java] equivilent to the following code:
    public static void main(String args[])
       System.out.println("Hello World!");
    ...with "Hello World!" comprising the text of the macro.

  • [body] and [main]
    In the next example, a static method and class are placed in a [body] tag. The text in the [main] tag goes to the main() method. If a [body] tag is used, the [main] tag must also be used. The resulting output will be "Here's my new object: Hello World!".
    private static class TestObject
       public String toString()
          return "Hello world!";

    private static void makeAnObject()
       TestObject obj=new TestObject();
       System.out.println("Here's my new object: "+obj);

  • variables and [settings]
    The variables defined with the [varset] tag are automatically integrated into all generated Java code. Setters and getters are created and any changes to the associated variables will be preserved once the [java] tag process finishes. In the following example, the variable "var1" is defined, then changed. The output from this example is:
    Here's my new object: Hello World!
    Goodbye World!
    In addition, the [settings] tag allows configuring the process in various ways. If a [settings] tag is used, a [main] tag is required. In this example the "showcode" setting is changed to "true" which will popup the generated Java code for debugging purposes. The "showerrors" setting is also changed to "true" which will popup any data sent to the System.err PrintStream. Also included is the "fastmode" setting. In the default compilation process, two variables, "line" and "loop" are set by default. These simply indicate the line of the [java] tag and the progress of any ongoing loops. In "fastmode", these variables are omitted, allowing a better chance that re-compilation won't be necessary.
    [varset]var1,Hello World[-varset]

    private static class TestObject
       public String toString()
          return getVar1();

    private static void makeAnObject()
       TestObject obj=new TestObject();
       System.out.println("Here's my new object: "+obj);

    var1="Goodbye World!";


  • [settings] continued, [import], and numbers
    Additional settings include 'runmacro' which by default is set to true. Turning this to false allows testing compilation or other issues without the risk of running the actual macro. The 'template' setting will be covered in the next section.

    In addition, the [import] tag may be used to include standard Java import statements. If an [import] tag is used, the [main] tag is required.

    Also note that numbers work as expected. All numbers formatted with a decimal point become Double objects, with all others becoming Long objects.
    [varset]var1,Hello World[-varset]

    import javax.swing.*;

    private static class TestObject
       public String toString()
          return getVar1();
    private static void makeAnObject()
       TestObject obj=new TestObject();
       JOptionPane.showMessageDialog(null,"Here's my new object: "+obj);



  • Templates
    If the template setting is used, as in the previous example, the file it points to will override the internal template used to generate code. The internal template is as follows, and the basic structure of any overriding template must be the same.

    public class _CLASS

       public static void main(String args[])
  • Known Issues
    Notice that when the source code is generated, variables that are otherwise valid can cause compilation errors due the creation of identical getters and setters. The following example will fail as two instances of "setKey" and "getKey" will exist.

    System.out.println("Hello World!");
  • [screenshots]
    This allows configuring the app to take screenshots automatically at specified tags. In this example, tags generate screenshots while blank lines and [mouse] movements do not. The delay of 200 milliseconds occurs after the event and before the screenshot is taken.

    First Line
    In this example, screenshots are disabled.
  • [screenshot-directory]
    Sets the location in which the screenshot files will be saved. If this is not set, the directory of the configuration is used. This tag isn't necessary if a directory is set by [screenshots]. In the following example, the directory is set to c:\screenshots
  • [screenshot]
    Takes a single screenshot.
  • [screenshots-webpage]
    This creates a webpage using the previously generated screenshots. The webpages can be observed without a server or additional tools. The following simple example creates a webpage with images scaled to 800/600, and can be seen here. Press "next" or "previous" to see the steps of the script. The optional browser parameter automatically loads the webpage.
    [command]erase c:\temp\screenshots\* /Q[-command]


    First line
    [loop] 4
    Top of loop[enter]
    [loop] 2
    Second line [varout]loop[-varout]
    Last line

    [screenshots-webpage]dimensions=800/600,browser=C:\program files (x86)\Mozilla Firefox\firefox.exe[-screenshots-webpage]
  • [screenshot-on-event]
    This will take a screenshot when a key or mouse event is detected. In the following example, screenshots will be taken infinitely, until a [stop] command is sent from another button, after which a website of all the images will be created.
    [loop] 0

    [screenshots-webpage]dimensions=800/600,browser=C:\program files (x86)\Mozilla Firefox\firefox.exe[-screenshots-webpage]
Shortcuts are various pre-set macros that perform common functions, such as Navigating back in a web browser, showing the desktop, bringing the mouse to the center of the screen, etc.

Application Launching
Application Launching runs an executable or batch file in the normal manner. Many common applications are included, such as Firefox, Chrome, notepad, etc. Notice that the supplied directories and filenames are typical defaults, and don't necessarily correspond to every system.

Mouse by Remote Control
This allows using your device as a touchpad. It can be configured to disable clicking, and to multiply the movement speed.

Saving And Uploading
An uploaded configuration must correspond to a configuration on your PC. By pressing the "Save and Upload" button, the Console will automatically update the saved copy of your configuration, or ask you to give it a name if you haven't done so. In addition, the "Save" button will save your configuration without uploading it.
As seen in the initial screenshots of the console and app, the user can optionally set a password and a port. The port should not be changed unless another application requires the default (15222). In any case, the port and password of the console must match those of the app. If the port is changed, the app and console must be completely restarted.