What I have: Computer, bundled cable, a lot of colored cables laid to the various light sources. Simply speaking, it's a house illumination. And I want to manage it with computer. But I can't do one thing. So, the heart of the problem: for example, I want to switch on the light in the yard by white cable, I press "1". And if I want to switch off light in the same place, I should press "1" again. And so on. But in practice, I can't implement this part correct. Could you show me just a bare and correct framework of one PullEvent? I hope this can be solved without bunches of IF statements. May be advanced parameters?
If it's possible, show an initial part of code, where you set variables designating sum of all cables.
Or just some advices/hints, I really need them. Sorry for possible language mistakes.