A bunch of people asked how to do this so I make a AHK file for it.
Basically all it does is if you have one or more bullets missing from your chamber it will reload, wait a bit, interrupt the reload with a weapon switch and quick scope as you switch back to your sniper rifle.
You must have the following binds in MW2.
Reload - R
Switch Weapons - Wheel Down
Aim down sight - Right Mouse Button
Shoot - Left Mouse Button
Hold Breath - Shift
Simply run it, and load up MW2, while in-game click with the Middle Mouse Button to execute the shot.
Note: If you aren't missing a round from your chamber there will be a slight delay between clicking Middle mouse button and firing.