Screen locking issue in attended process

Hi

I have went across the following thread

I saw a script shared by @marian.platonov

Just want to know, if the f15 key is not present in mschine , which key wr should use in script ?

Also how this script can be ran along with UiPath attended process to keep screen active ?

Hello @NNR

Save this below text in notepad as keepactive.vbs or any name but extension should be .vbs

Set ws = CreateObject(“WScript.Shell”)
Do
ws.SendKeys “{F15}”
WScript.Sleep 50000 ’ Waits 50 seconds
Loop

Then in UiPath use activity “Start Process”
image

Hope this will work

Regards,
rajesh Rane

So when the code is executed it will still continously presss f15 key ?

How it can be verified ?

@NNR

Yes. continuously “press” the F15 key every 50 seconds by sending it to the currently active window.

Regards,
Rajesh Rane

Did not get what u said ?

If you look at vb script ,

its will continuously press the F15 key every 50 seconds.

Set ws = CreateObject(“WScript.Shell”): Creates a script shell object to send keystrokes.
ws.SendKeys {F15}: Simulates pressing the F15 key.
WScript.Sleep 50000: Waits for 50 seconds.
Loop: Repeats forever.

Regards,
Rajesh Rane

But how do we know or verify that program is working as expected?

I tested at my end you can also test

call this file in start process activity and Test

Regards,
Rajesh Rane