I only do it right after waking them up from a nap. I give them a treat to get them up, and then while they're eating the treat I get behind them. They're now sitting or standing with me behind them, and I kneel down, so now they're inbetween my legs. As soon as they're done eating the treat, I gently pull their head back with both hands, pill tucked inbetween thumb and forefinger, so I use just three fingers of the one hand. I use my middle finger and push at the back of the jaw to get the jaw open, with their head pulled back now with the other hand. I push the pill onto the back of the tongue with my forefinger, and then quickly shut their mouth and hold it shut with their head still tilted back. They're squirming - but can't go anywhere because they're held with my legs and both hands. They swallow quickly a couple of times - but can't spit the pill out because I'm holding their mouth shut. Because their head is tilted back but their mouth is shut, they've now swallowed the pill. I immediately praise them and give them another treat. Spooky LOVES cat milk (Whiska's), so for her I get a small bowl ready, and as soon as I think she's swallowed the pill, I put the bowl of milk down, and she laps it up - so I know the pill is gone, too.
This works for Shelly, our worst squirmer, who would get away or spit the pill out even when Gary and I both tried to hold him.
The trick is to do it all VERY quickly. And you have to make sure you get the pill in the BACK of the tongue, or even holding their mouth closed for a short period of time won't get it down. But that tilting the head back thing and holding their mouths shut really seems to work. Even Shelly isn't mad as soon as he's eaten the "GOOD BOY!" treat, and Spooky no longer bolts into her hidey place after the pill episode is over.