How to control UI/Apps from shell?
There's not really an easy method for this. There's no AppleScript implementation for interactions on iOS, unlike OS X, so if you really want this you're probably going to have to make it happen yourself with your own custom app.

Even with your own app, there's no easy way of doing interaction.


  On Cocoa Senior (also known as "the Mac") we have methods like the gargantuan:

mouseEventWithType:location:modifierFlags:timestamp:
  windowNumber:context:eventNumber:clickCount:pressure:

  
  to generate events.
  
  Cocoa Junior on the iPhone doesn't have any methods like this, so we must work out how to achieve it ourselves.


This is outside the scope of this site, but see the following site for more information:


http://www.cocoawithlove.com/2008/10/synthesizing-touch-event-on-iphone.html