Any AppleScriptable application must export a scripting dictionary so that AppleScript knows what these commands are. You can see any application dictionary by opening the application in the Script editor.
Note that even if the application does not provide Script commands for what you want, System UI Scripting or Automator can probably still be used to control its interface. (For example, to select the Home or Rotate commands in the iOS Simulator menu bar.)
In addition, in the iOS-specific user interface automation tool, you can use the Tools application that comes with Xcode.
source
share