A safety device for sliding windows or doors comprising a hydraulic cylinder assembly including a piston and piston rod wherein the piston rod is pivotally secured at its lower end and is made adjustable so that the sliding window or door may be moved from a fully closed position to variable open positions.