In a good opening both sides played attractive football and the first real chance fell to Ricketts in the 16th minute, but he saw a shot parried wide from a free-kick by Marco Reich.
Ricketts atoned just two minutes later notching his tenth goal of the season from 12 yards after Nicholls and Mark Bradley had both had efforts blocked.
After that it was largely the Robins who dominated, with striker Billy Paynter a constant threat particularly in the air.
Walsall threatened only rarely, but they increased the lead in the final minute when Nicholls scored with a close-range header from a cross by substitute Richard Taundry.
With the game into added time Swindon broke again and Paynter gave them hope by scoring with a speculative shot from 30 yards.
First-half goals from Clive Platt and Paul Reid made it back-to-back wins for Colchester as they ended Northampton Town's hope of making three wins on the bounce with a 2-1 success at Sixfields.
Colchester's aerial presence paid off in the 23rd minute when Dean Hammond crossed and the unmarked Platt headed past Frank Fielding.
Three minutes later, the former Cobbler Reid outjumped the home defence to head home another Jackson corner to double the advantage.
The half-time introduction of Nicholas Bignall injected some venom into the Northampton attack and they reduced the arrears in the 53rd minute when Danny Jackman's deflected free-kick wrong-footed keeper Jimmy Walker.