How can i login machine by script when the machine is locked
Short answer. You can't. You can set the machine to login automatically however.
A good rule of thumb is to never measure with your thumb.
Else prevent the machine from locking..
-- Here to Learn and share ---
There are some untested ways though
And some details on the topic though not a solution by any chance
Buy the NEW QTP Descriptive Programming Unplugged Book
** Download QTP Unplugged 2nd Edition eBook for FREE **