How to apply StressComponent ZX via StressStrain.pl (instead of the built-in StressComponent XZ)

Dear Materials Studio Experts,

Since I'm working on inhomogeneous materials, I need to apply StressComponent ZX (instead of the built-in StressComponent XZ). Can anyone help me take a look, or modify this script? thank you very much.

I'm in a hurry, and I can also give some compensation.

Delete the suffix .txt to get the original script.pl