D : Exclude all diagrams, O : Exclude a selected diagram. (for others, use F1)
7) Back to previous menu, (click ESC) and enter 'Square diagrams'->'Symbolic Calculations'->'MATHEMATICA code'
When you enter 'MATHEMATICA code', it seems nothing happens, but don't worry. It really generated m-file script in your folder.