control a jack/cylinder to open/close a window
Check out this instructable - for opening a window for a cat :)
The guy used a servo, Towerpro MG995 with 10 kg torque for opening/closing the window, and a 10cm distance sensor for sensing the cat (he used Pololu Carrier with Sharp GP2Y0D810Z0F Digital Distance Sensor, but I believe that any proximity sensor will do). 

This is a pictrure of the mechanism, seems quite robust: