Hi friends ,
I've created a driver script for 15 scripts . I wish to know that how to make TP lock my machine after test execution is over ? Thanks in advance [img]/images/graemlins/smile.gif[/img]
- Regards ,
Veena Katiyar .
That is a interesting question,
My suggestion would be you can make a batch file with the necessary commands to lock your computer and run that batch file from testpartner.
Cannot think of anyother solution.
If it is a XP pc and on a domain, you could get TP to type:
The keyboard shortcut to lock a PC is Windows Key + L but TP does not appear to recognise this combination, else you could use the Window.HotKey method.
On writing the above string of keystrokes, TP gives an exception error.
I am not sure if key press events would work as if you press alt + Ctrl + Del TP loses control of active window and wont be able to recognise the latest window.
Click anyplace on the desktop & then click on the lock computer icon:
' Attach to Program Manager Window
Window("Program Manager Window").Attach
ListView("Index=1").Click 1, 1
' Attach to Window
Found a much easier way that works in TP:
Shell "rundll32.exe user32.dll, LockWorkStation"
Thanks Ben !!!
It does work on my XP machine [img]/images/graemlins/smile.gif[/img]
Why do you want to lock the machine.. you can use a tool called Caffine that stops window from getting into locked mode.
"life is simple if you can see both sides of a coin" - by me