Running scripts from realdash

Is it possible to write scripts or macro commands to run other applications on Android and control them, for example I want to create a completely new UI whose top layer is realdash and the bottom layer is Android and add buttons to control the application on Android

Very difficult to achieve as Android security prevents most interaction between the apps.