You can't. A Test Item is what determines whether or not something is running. You can't "check or uncheck" it as part of code because it is already potentially running.
May I ask what you're trying to achieve? Perhaps there's a different way.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
tristaanogre is correct – there's no way to change this option programmatically. If you could let us know what you are trying to achieve, we might provide you with another approach.
Community and Education Specialist