Under the MCGS menu bar – Tools – User Rights Management – ​​after setting the username and password:
1. Open the MCGS Workbench – open the main control window – enter the menu configuration
2. In the menu configuration – right click on the new menu item – double click to open the properties window of the newly created menu – change the menu name to the name of the window you want to set – then click on the rightmost script window
3. Suppose the window name you want to encrypt is "Window 1" and only the user of the administrator group can successfully log in to open the window. The script program is as follows (tested successfully):
Only window scripts opened by the Administrators group:
IF! LOGON()=0 THEN
IF! STRCOMP(!GetCurrentGroup( ),"Administrator Group")=0 THEN
Window 1.Open()
Else
Window 1.Close( )
ENDIF
ENDIF
A window script that opens without distinguishing user groups, as long as the password is correct:
IF! LOGON()=0 THEN
IF! STRCOMP(!GetCurrentGroup( ), "Administrator Group")=0 OR ! STRCOMP(!GetCurrentGroup( ),"Operator Group")=0 THEN
Window 1.Open()
Else
Window 1.Close( )
ENDIF
ENDIF
MCGS configuration can be started after entering the correct password before the start button, how to set the button password for mcgsCreate a window welcome interface
On entering the menu button
When the password is correct, the menu interface is entered.
The password is incorrect or enters the welcome screen. This enters a loop.
If you use the wrong password, you can still get into it.
Of course, if you want to change your password,
Can subtract one button
Input inside
This way you can modify your login password.
If you need to set up a screen saver
You add a looping strategy like this and add a script.
This idea: Press the start button, first pop up a small window screen, inside a text, and OK button and cancel, after entering the text content, press OK, if the text content = the password you want to enter, then start the variable Will be set to 1, if not, then cleared
! LogOn() can be implemented with this library function. This function returns 0 to indicate that the password is correct. For details, please refer to the help documentation.
Mcgs user permission operation functionAs shown in the figure, open the script editing page. All the functions, variables, devices, windows, controls, etc. in the tree structure on the right side can be double-clicked directly.
Pison And Fuel Injection,String Water Carrier,String Water Conduit,Golden String Pipe
Jinan Guohua Green Power Equipment Co.,Ltd. , https://www.guohuagenerator.com