Best Answer - Chosen by Voters
Depending on whether you live in the city or not, but you could invest in a shotgun (if you're a bad shot) or a .22 cal rifle (if you're a good shot). This way you could eliminate the problem. Also, it sounds like it'd be relieving too.
If that's not possible (or preferable), figure out why they might be pecking in the first place. Do you leave your windows shades open for them to see something of interest inside? Maybe they are using the screen material for nesting. Try keeping the window shades closed/down and maybe get outside covers you can drape over the windows.
If you have a dog (other than an ankle-biter) that might have the intestinal fortitude to bark at these birds, then put it outside while you're gone. Could put a motion sensor alarm outside to freak them out too.
Lots of options, just look into why they might be pecking at the windows and take the appropriate action.