There are air cylinders you can get that will do what you want. look into air over oil. The system uses 2 cylinders one for air and one filled with oil joined together so they operate as one. you can valve the oil side and freeze the action of the air cylinder. it's inexpensive and easier to implement that a hydraulic system.