← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #688683]: Windows: lock screen not working using keyboard shortcut --- not possible --- workaround

 

Question #688683 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688683

Description changed to:
workaround:

using 'run('rundll32.exe user32.dll,LockWorkStation')' does the job.

BE AWARE: your script will not have any access to screen, mouse and keyboard anymore.
Unlock has to be done manually or with other means

-------------------------------------------------------------------------------------------------------------------------------


I'm trying to lock the screen after my script has run (win 10) using the following code

type('l', Key.WIN)

but this is just typing the 'l' character and not locking the screen

I've got a workaround using 'run('rundll32.exe
user32.dll,LockWorkStation')' but I'm just wondering why this keyboard
shortcut isn't working?

other actions using the "Windows" key seem to work fine

thanks

L

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.