if it's an espag lock, you could try removing the handle and tightening the screws under the lock mechanism. this might lift the espag mechanism up into the window again if the screws will bite. if not you could try a marginally wider screw to get a bite.
do it by hand, put the cordless away!