Ahaaaa!
I am a dufus. As soon as you said "assuming your attribute is called 'turnon'", I realised...
It is indeed called "turnon". Not "turn on". No wonder it wasn't working!
Turns out I was doing the right thing after all (your 'do' command seems to be the same as the GUI's "Run an object's script attribute" which is what I'd done.
I just can't spell

Thanks

Thanks also, george - jay's solution is better in this case, but now you're reminded me about functions I should probably see how I can use them more in other ways

psy