Limit Switch vexcode

I am using vexcode text (just updated it yesterday so the program is the latest version). I want to add a limit switch to my robot, does anyone know where to find example programs including a limit switch. I just want a simple if limit switch was hit then move four drive motors to the right (no drivetrain).

This isn’t quite an example of limit switch code, but here’s a help page for limit switches/ 3-wire devices:
This page is a reference for programming it:
And this is an example with a bump switch, which would probably be pretty similar to what you want:
Hopefully that helps you :smiley: