Hi Team,
Will the script execution happens if I lock my system, I mean I would like to kick-off the script execution, if the script execution is not completed I want to lock my system and look the results on the next day.
Regards,
Dal...
Script Execution while System Locked
Re: Script Execution while System Locked
1) If you lock your system, scripts that interact with the GUI will fail.
2) If you setup your system to lock automatically after some amount of inactivity, then when a script has completed the system will lock. Much like your system will lock when you don't move the mouse for 5 minutes (or whatever you have your timeout set to).
2) If you setup your system to lock automatically after some amount of inactivity, then when a script has completed the system will lock. Much like your system will lock when you don't move the mouse for 5 minutes (or whatever you have your timeout set to).
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Script Execution while System Locked
Hi Dal
After running your tests simply use the two lines of code below to lock your PC.
Private Declare Function LockWorkStation Lib "user32.dll" () As Long
LockWorkStation
Also, if you have the inactivity lock set then you can use loop the below where ever there are long waits.
Public Sub randomMouseMove()
Mouse.MoveTo(Host.Local.Element, (New Location(random.Next(0, 1000), random.Next(0, 1000))))
End Sub
Hope that helps!
Scott
After running your tests simply use the two lines of code below to lock your PC.
Private Declare Function LockWorkStation Lib "user32.dll" () As Long
LockWorkStation
Also, if you have the inactivity lock set then you can use loop the below where ever there are long waits.
Public Sub randomMouseMove()
Mouse.MoveTo(Host.Local.Element, (New Location(random.Next(0, 1000), random.Next(0, 1000))))
End Sub
Hope that helps!
Scott
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Script Execution while System Locked
And if you don't want anyone to influence your testing, you can disable the physical mouse and keyboard using the following code:
Regards,
Alex
Ranorex Team
Ranorex.Keyboard.Enabled = false; Ranorex.Mouse.Enabled = false;Only input from the physical mouse and keyboard will be ignored, the only input that is accepted is the Keyboard.AbortKey which will abort the execution (if it is set in your code).
Regards,
Alex
Ranorex Team
Re: Script Execution while System Locked
Thanks all for your suggestions.
In order to handle this situation, we have used a Tool called "Caffine.exe" downloaded from the web, and its activated whenever I perform any execution to prevent the system from locked out.
Regards,
Dal...
In order to handle this situation, we have used a Tool called "Caffine.exe" downloaded from the web, and its activated whenever I perform any execution to prevent the system from locked out.
Regards,
Dal...