I do this in one of my windows & it works great.
My littles also wouldn't go out to eat or drink. I put down leaves & scratch & chased them out of the coop & locked the door behind them. :gig They got over it quick & ate & drank so I let them back in.