Please Ask one question per thread
For the questions about script code, please provide details of how you are calling the objects and running the commands, and which files they're being run on if applicable.
The scripting objects definitely work in general. If they didn't, half the script son the forum would fail.