We didn't make Jack Sparrow leave. Not that he was in the house in the first place. But his stay at our window was probably due to the season, the fact that he (or she) had eggs, and the particular way the sun was falling on the glass. He did visit nearly every day for weeks, though.
We tried leaving bread outside for him, and also sneaking out to try to tame him, but he would always fly away, and never ate the bread before the squirrels or Brahma got to it.