in reply to Re: How to execute win32 functions when the user session is locked.
in thread How to execute win32 functions when the user session is locked.

Yes I got the answer for my question.
When I want to use the foreground windows in my script and lock the session, there will not be any foreground windows because the display will be in inactive state.
so instead of
SetForegroundWindow($_);
SendKeys("Password01");

I used WMSetText(HWND,Text); function to interact with my window controls.. and its working now... :)
Thanks for all the replies on this post :)

  • Comment on Re: How to execute win32 functions when the user session is locked.