I will show you one example how you can make AI soldiers crouch when they are not moving. Adjust this to your needs if it is not exactly what you want.
Put into a trigger:
Axis A = 0, Axis B = 0
Activation: Repeatedly
Countdown: Min = 1, Max = 1, Mid = 1
Condition: speed r1 < 0.001 && canstand r1
On Activation: r1 playmove "crouch"
where r1 is the unit you want to crouch when not moving. What it does: checks if unit's speed has been under 0.001 for at least 1 second, and also if the unit is able to be in a crouched position (not wounded too much). If these conditions are met, the trigger makes the unit crouch. When the unit starts moving again, crouching is of course over and will start again when the unit stops again.
#EDIT
Additionally you need to put
this setUnitPos "up";this setBehaviour "combat"
to the unit's initialization field (or make it in init.sqs) to get the crouching effect described above.