Skip to main content

Lock-Screen

Command Description

Lock the system screen and setup the subsequent code to run while the screen is locked

Command Prototype

bRet = RDP.LockScreen(username,password,optionArgs)

Parameter Description

ParameterRequiredTypeDefaultDescription
usernameTruestring""Local username or the Microsoft account used to log into this computer
passwordTruestring""Password used to log into this computer (or the Microsoft account used in this computer)
widthNonenumberNoneSet the lock screen resolution width, automatically adapt the width when the parameter is 0
heightNonenumberNoneSet the resolution height of the lock screen. 0 means automatically adapting the height

return

bRet,The variable used to save the output of the command.

Demo

TracePrint("--------------------------Screen lock screen------------------- ---------") 
//-------------------------------------------------------------------------------
//[Remarks] Lock the system screen to ensure that subsequent codes can run normally in the locked screen state.
//Input parameter 1:
// username--user or account. Note: Username or Microsoft account to log in to the system
// password--password. Note: Password to log in to the system (Microsoft account needs to enter the password of the Microsoft account)
// optionArgs--Optional parameters. Note: This parameter is a number of optional parameters, including resolution width, resolution height
//out parameters:
// bRet--The variable to which the output of the function call is saved.
//Command prototype: bRet = RDP.LockScreen(username,password,optionArgs)
bRet = RDP.LockScreen("Administrator","laiye666",{"width":0,"height":0})