Since changing from a FORTRAN program on a Fujitsu mainframe (a user hostile machine) to an X based workstation program the internal workings of Robot have changed considerably. Things are still somewhat in a state of flux and, if you want to add your own code to ROBOT, it is strongly recommended that you contact the author directly.
Internally the main routine for getting user input is called ``getit''. This obtains input from a file or from the workstation screen as appropriate and writes to the log file if required. The program returns a string. The routine ``dcode'' obtains numerical information/key-words from the text string, determines if any of these values were enclosed in brackets (this is what ROBOT uses to tell if it's allowed to alter user input values or not) and does simple arithmetic operations. Adding a new command to the GUI is simple providing: (i) your command doesn't require other commands to be activated/deactivated, (2) your command itself isn't activated/deactivated by other commands, or (3) the command displayed in a menu is the same as the one stored in the log file and used internally by ROBOT.