need help with code for controlling a hydraulic press mode

Hi.

As the others tried to point out, it's important to use the correct names for the items you are using, or else the people trying to help you do not understand what you're talking about.
A microswitch looks like this:

(grabbed from tamiya website).
You are showing a relay, which is a completely different part.

Also, 50 volts AC is unsafe to connect to your Arduino.
The person at the shop you bought this stuff from, has built you a rectifier to make DC from the AC, using a diode and a capacitor.
Then he reduced the voltage by a huge (in size) 5 Watt, 6800 Ohm resistor and a zener diode.
Did he explain what this all does, and more important, do you understand that.
If not, what compels you to use this piece of hardware that you do not understand ?
In this case a relay would be a better choice, maybe with help of a resistor in case you can't find a 50 volts version.