[HELP] online monitoring of a switch

for confirmation, you mean using switch/case can solve the case???

You still have a lot of work to do but switch/case should make it easier for you in the long run. It is not a quick cure !