declare a short variable. this will be your "state". it will have the value of 0 or 1, starting at 0 by default. decide what you want as a "trigger". then use a conditional (an "if" line) that when triggered changes state to 1. the next part of the script will be an if/elseif block checking state. if state is 0 disable, if state is one enable.
scripting isnt too hard, it's basically stringing console commands together.
while i know of nothing that will autogenerate scripts for you, i do know of a good document to get you started scripting for yourself - Morrowind Scripting for Dummies (vol 9). tis invaluable, i have it open at all times when i'm scripting something.