If I used kings court on a hermit, and did not buy anything could I trash the hermit and gain 3 madmen? My take on it is no because you are only trashing 1 hermit. What do you all think?
It says "when you discard this from play". You can only discard it once, thus you only get one Madman.
If it said, "At the end of your turn, if you did not buy anything this turn, trash this and gain a Madman from the Madman pile", you would get three of them. Gaining Madman doesn't rely on you trashing the Hermit. That's why you can use scheme to put a hermit on top of the deck and still get a madman.
This is the correct result, but not the right reasoning. Compare with Scheme: "At the start of Clean-up phase this turn" only happens once, yet when I KC Scheme, I still get to choose 3 cards to top-deck. The fact that "When you discard this from play" only happens once is not the reason that you only get one Madman.
Any text that appears above the line on a card (or all text on the card, if there is no line) happens every time the card is played; hence, when you KC Scheme, it sets up the same event three times, and by the time you get to the trigger, you have three events happening simultaneously, so you get to choose the order of them, and then resolve all three of them. If the text on Hermit were not below a line, then if you KC'd it, you would get three Madmen, because you are setting up three events, each of which is triggered simultaneously when you discard Hermit. Since there is a simultaneous trigger, you choose the order of resolution (which doesn't matter). (Note that the Madman gaining is only contingent on whether you bought any cards this turn, and not on whether you just discarded Hermit from play.) However, since the text is below a line, it is text that is generally true whenever that card is present in the kingdom (or Black Market), so it will trigger regardless of whether you play Hermit at all. (If there were a way to get Hermit into play without playing it, you would still be able to get a Madman; the analogue does not apply for Scheme.)
Changing the wording from "When you discard this from play" to "At the end of your turn" would not change anything; each of these events is only triggered once. What matters is whether the text is above or below a line.
Here is Donald X. on the significance of lines:
http://boardgamegeek.com/article/8150227#8150227.