the key things to remember with pill spamming are 2 things: spacing and variation.
Spacing is pretty important against Marth and link. They are both fairly powerful characters so can hurt you quite badly if you pill too close. Try to learn how close you can get without being vunerable after the pill lag. Marth for instance has a lot of range in the fsmash but if you stand so that you are just out of range, you can pill spam.
Variation is a good thing to do as well since predictable pill spamming will be evaded and punished. I suggest you read the pill section on Cyphus' guide If you haven't already, which is very good and learn how to use all the pill techniques. Use all of these when pill spamming and make it hard for your opponent to dodge them. For instance, if you just pill from the ground, your opponent can just jump over them.
Don't forget this as well- pill spamming is a good technique to build up damage and to create an opening. You shouldn't really be doing it as much if your opponents are at high %
Hope that helped
d_shep04- I wouldn't wd forward and pill, it will leave you really vunerable.