FWIW, as far as I can tell, there's no particular need to turn off script mode. You probably want to turn it off before you return to manual operation, but I haven't noticed any problems just turning it on at the start of the script and off at the end.