hover the mouse pointer over the light without selecting it, and at the bottom left of the map editor there is the status panel, then entity number is displayed in there. Use this number instead of (e) in hidelight and showlight. You should not need a different script for the lights only the switches.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.