Shaft Encoders Simple Program

I Would Like To Know How To Program Shaft Encoders. With The In The Zone Game, I Would Like To Program A Button On The Controller That Would Bring Our Lift To The Height Of The Loading Placeholder Of The Preloads. Also To Control The Drive In Autonomous. Which Ports Do I Plug Them Into And How Do I Pull Them Up In The Motor And Sensor Setup? How Many Are Required? How Do I Use Them In Autonomous And How Do I Attach Them To A Button? Any Help Is Greatly Appreciated

Take a look at the section on shaft encoders in the VEX EDR video trainer.

quad encoders plug into the digital ports.
Look under the sensors tab of the motors&sensor setup.
You can read the value of an encoder using the SensorValue function.
encoders do not attach to a button, you will need to detect the button press, start the lift motors and then compare the value of the encoder to a know value that will correspond to the preload position for the lift. When that point is reached, stop the lift motors.