And the following one is the Romanian version (I think no one is interested of it):
Code:
#UseHook
#NoTrayIcon
#WinActivateForce
myPassword =
myName =
START:
Gui, Font, S8 CDefault, tahoma
Gui, Add, Text, x26 y20 w80 h20 ,Nume:
Gui, Add, Text, x26 y40 w80 h20 ,Parola:
Gui, Add, Text, x26 y60 w80 h20 ,Repet-o:
Gui, Add, Edit, x116 y20 w140 h20 vmyName, %myName%
Gui, Add, Edit, x116 y40 w140 h20 vmyPassword +Password, %myPassword%
Gui, Add, Edit, x116 y60 w140 h20 vmyPassword2 +Password, %myPassword%
Gui, Add, Button, x100 y87 w86 h27 gTESTDATA +default, Blocare
Gui, Show,center h128 w320, Blocare computer
Return
TESTDATA:
gui,submit
if (myName == "") {
msgbox 16,Eroare,Trebuie sa scrii un nume sau o porecla a ta.
goto START
} else if (myPassword <> myPassword2 ) {
msgbox 16,Eroare,Parolele nu se potrivesc.
goto START
}
SetTimer, MoveToForeground, 10
informationText = %myName% a blocat computerul folosind o parola. Numai %myName% il poate debloca.
goto LOCKED
return
LOCKED:
gui, 2:color, black
gui, 2:show, center h2024 w2000
gui, destroy
Gui, Font, S8 CBlack, tahoma
Gui, Add, Text, x16 y10 w550 h40, %informationText%
Gui, Add, Text, x16 y30 w50 h20 , Parola:
Gui, Add, Edit, x66 y30 w380 h20 vTypedPswd +Password,
Gui, Add, Button, x452 y30 w101 h23 gVERIFY +default, Introducere
gui, -sysmenu +alwaysontop +WS_EX_TOPMOST -caption
Gui, Show, center h60 w561, %A_ScriptName%enterPswd
return
VERIFY:
Gui, Submit
if (TypedPswd <> myPassword) {
informationText = Parola incorecta.
goto LOCKED
return
} else {
exitapp
}
return
MoveToForeground:
WinActivate, %A_ScriptName%
WinActivate, %A_ScriptName%enterPswd
IfWinExist ahk_class #32770
winkill, ahk_class #32770
return
*LCtrl::return
*RCtrl::return
*LAlt::return
*RAlt::return
*LWin::return
*RWin::return