How to select an object with object-name using script?

 From:  hamkoo
9848.1 
How to select an object with object-name using script?tks!