There are 2 steps using script to get the phase:
1: get the field components. As you know, the phase is associated with Ex,Ey, Ez (or H components). So you can use
E=getresult("monitor","E");
Ex=E.Ex;
Ey=E.Ey;
Ez=E.Ez;
similarly you can get x,y,z and f.
2: get the phase. for example for Ex, you can write
xphase=angle(Ex);
which will be a function of xyz and f.