Sign in to follow this  
Followers 0

Desktop Locker

37 posts in this topic

Posted

If you do not want anyone to interfere with your Comp. You must use this program. :)

#NoTrayIcon
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ScrollBarConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#Include <GuiEdit.au3>
#include <Misc.au3>

While 1
    $code = InputBox("Desktop Locker", "Safety. Please reset your password."&@CRLF&@CRLF&"Enter:New Password", Default, "", 250, 143, 370, 300)
    If @error Then
	Exit
	ElseIf $code = '' Then
		ToolTip("Please enter your password in the spaces.", 370, 300, "Desktop Locker", 1, 0)
		Sleep(3000)
		ToolTip("")
	Else
        $plate = StringReplace($code, "|", @CRLF)
        $Password = $plate
		ExitLoop
    EndIf
WEnd

$btn = MsgBox(36, "Desktop Locker", "You want to lock the screen with this code for?.")
If $btn = 6 Then
$Locked = GUICreate("Desktop Locker", @DesktopWidth+3, @DesktopHeight, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
GUISetBKColor(0x000000, $Locked)

$Progress1 = GUICtrlCreateProgress(440, 415, 150, 10)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

GUICtrlCreatePic("lock.gif", 430, 130, 164, 144)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

$WrongPw = GUICtrlCreateEdit("", 10, 14, 300, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL,$ES_READONLY), 0)
$InputPw = GUICtrlCreateInput("", @DesktopWidth/2-100, @DesktopHeight/2-10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0)

GUICtrlCreateLabel("Desktop Locker", @DesktopWidth/2-125, @DesktopHeight/2-95, 260, 50, $ES_CENTER, 0)
GUICtrlSetFont(-1, 30, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)

GUICtrlCreateLabel("Please enter a password to unlock the screen.", @DesktopWidth/2-185, @DesktopHeight/2-50, 400, 20, $ES_CENTER, 0)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)

GUICtrlSetFont($WrongPw, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor($WrongPw, 0xFFFFFF)
GUICtrlSetBkColor($WrongPw, 0x000000)
GUICtrlSetFont($InputPw, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor($InputPw, 0xFFFFFF)
GUICtrlSetBkColor($InputPw, 0x000000)

WinSetState("[CLASS:Shell_TrayWnd]","", @SW_HIDE)
GUISetState(@SW_SHOW, $Locked)
_MouseTrap(@DesktopWidth,@DesktopHeight)

While 1
	If _IsPressed("0D") Then
		If GUICtrlRead($InputPw) == '' Then
			ToolTip("Forgot your password. Please enter the correct", 509, 375, "", 1, 3)
			Sleep(3000)
			ToolTip("")
		ElseIf GUICtrlRead($InputPw) == $Password Then
			For $i = 0 To 100 Step 10
				GUICtrlSetData($Progress1, $i)
				Sleep(100)
			Next
			Sleep(800)
			GUICtrlSetData($Progress1, 100)
			GUISetState(@SW_HIDE, $Locked)
			WinSetState("[CLASS:Shell_TrayWnd]","", @SW_SHOW)
			_MouseTrap()
			GUICtrlSetData($WrongPw, "")
			GUICtrlSetData($InputPw, "")
			ExitLoop
		Else
			GUICtrlSetData($WrongPw, _RandomMsg() & @CRLF & GUICtrlRead($WrongPw))
			ToolTip("The password is incorrect ..try again.", 509, 375, "", 3, 3)
			Sleep(2000)
			ToolTip("")
			GUICtrlSetData($InputPw, "")
		EndIf
	EndIf
	If Not WinActive("Desktop Locker") Then
		WinActivate("Desktop Locker")
		_MouseTrap(@DesktopWidth,@DesktopHeight)
		GUICtrlCreateLabel("MESS WITH THE BEST DIE LIKE THE REST!", Random(@DesktopWidth-540), Random(@DesktopHeight-30),540,30)
		GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif")
		GUICtrlSetColor(-1, 0xFF0000)
		GUICtrlSetBkColor(-1, 0x000000)
	EndIf
Wend
Else
	Exit
EndIf

Func _RandomMsg()
	Local $RandomMsg[10]
    $RandomMsg[0] = "Wrong Password!"
    $RandomMsg[1] = "Step away from the computer."
    $RandomMsg[2] = "Your not Jim."
    $RandomMsg[3] = "Give Up!"
    $RandomMsg[4] = "Don't Touch!"
    $RandomMsg[5] = "Please Enter Correct Password."
    $RandomMsg[6] = "Try Again!"
    $RandomMsg[7] = "Stop pushing my buttons."
    $RandomMsg[8] = "INS! INS!"
    $RandomMsg[9] = "Ctrl-Alt-Dipshit"
    Return $RandomMsg[Random(10)]
EndFunc
satanttin likes this

Share this post


Link to post
Share on other sites



Posted

Nice program in the list of screen locks :) .

But when the screen is locked, I still see a small strip of my wallpaper: just modify this code:

$Locked = GUICreate("Desktop Locker", @DesktopWidth+3, @DesktopHeight, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)

;Should be:
$Locked = GUICreate("Desktop Locker", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)

And it would be nice if the progress bar is a bit higher on the screen, because the label overlaps the progress and vice-versa. Just modify the progress code:

$Progress1 = GUICtrlCreateProgress((@DesktopWidth - 400) /2, @DesktopHeight/2 + 20, 400, 10)

Now it's a bit bigger and it doesn't overlap the label or whatever on my 1280x1024px screen.

Another remark: why would you set the data of the input and wrong password label to nothing if the program is just gonna closed??? And why would you set the data of the progress to 100 if it's already 100???

I don't want to nag a lot, but you just have useless functions used and you could make your code shorter :)

P.S. I ran Tidy on it because it was not so clear for me.

Code after I modified it:

#NoTrayIcon
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ScrollBarConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GuiEdit.au3>
#include <Misc.au3>

While 1
	$code = InputBox("Desktop Locker", "Safety. Please reset your password." & @CRLF & @CRLF & "Enter:New Password", Default, "", 250, 143, 370, 300)
	If @error Then
		Exit
	ElseIf $code = '' Then
		ToolTip("Please enter your password in the spaces.", 370, 300, "Desktop Locker", 1, 0)
		Sleep(3000)
		ToolTip("")
	Else
		$plate = StringReplace($code, "|", @CRLF)
		$Password = $plate
		ExitLoop
	EndIf
WEnd

$btn = MsgBox(36, "Desktop Locker", "You want to lock the screen with this code (" & $Password & ")? ")
If $btn = 6 Then
	$Locked = GUICreate("Desktop Locker", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
	GUISetBkColor(0x000000, $Locked)

	$Progress1 = GUICtrlCreateProgress((@DesktopWidth - 400) / 2, @DesktopHeight / 2 + 20, 400, 10)
	GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

	GUICtrlCreatePic("lock.gif", 430, 130, 164, 144)
	GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

	$WrongPw = GUICtrlCreateEdit("", 10, 14, 300, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL, $ES_READONLY), 0)
	$InputPw = GUICtrlCreateInput("", @DesktopWidth / 2 - 100, @DesktopHeight / 2 - 10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0)

	GUICtrlCreateLabel("Desktop Locker", @DesktopWidth / 2 - 125, @DesktopHeight / 2 - 95, 260, 50, $ES_CENTER, 0)
	GUICtrlSetFont(-1, 30, 800, 0, "MS Sans Serif")
	GUICtrlSetColor(-1, 0xFFFFFF)
	GUICtrlSetBkColor(-1, 0x000000)

	GUICtrlCreateLabel("Please enter a password to unlock the screen.", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
	GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
	GUICtrlSetColor(-1, 0xFFFFFF)
	GUICtrlSetBkColor(-1, 0x000000)

	GUICtrlSetFont($WrongPw, 12, 800, 0, "MS Sans Serif")
	GUICtrlSetColor($WrongPw, 0xFFFFFF)
	GUICtrlSetBkColor($WrongPw, 0x000000)
	GUICtrlSetFont($InputPw, 12, 800, 0, "MS Sans Serif")
	GUICtrlSetColor($InputPw, 0xFFFFFF)
	GUICtrlSetBkColor($InputPw, 0x000000)

	WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
	GUISetState(@SW_SHOW, $Locked)
	_MouseTrap(@DesktopWidth, @DesktopHeight)

	While 1
		If _IsPressed("0D") Then
			If GUICtrlRead($InputPw) == '' Then
				ToolTip("Forgot your password. Please enter the correct", 509, 375, "", 1, 3)
				ToolTip("")
			ElseIf GUICtrlRead($InputPw) == $Password Then
				For $i = 0 To 100 Step 10
					GUICtrlSetData($Progress1, $i)
					Sleep(50)
				Next
				GUISetState(@SW_HIDE, $Locked)
				WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_SHOW)
				_MouseTrap()
				ExitLoop
			Else
				GUICtrlSetData($WrongPw, _RandomMsg() & @CRLF & GUICtrlRead($WrongPw))
				ToolTip("The password is incorrect ..try again.", 509, 375, "", 3, 3)
				Sleep(2000)
				ToolTip("")
				GUICtrlSetData($InputPw, "")
			EndIf
		EndIf
		If Not WinActive("Desktop Locker") Then
			WinActivate("Desktop Locker")
			_MouseTrap(@DesktopWidth, @DesktopHeight)
			GUICtrlCreateLabel("MESS WITH THE BEST DIE LIKE THE REST!", Random(@DesktopWidth - 540), Random(@DesktopHeight - 30), 540, 30)
			GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif")
			GUICtrlSetColor(-1, 0xFF0000)
			GUICtrlSetBkColor(-1, 0x000000)
		EndIf
	WEnd
Else
	Exit
EndIf

Func _RandomMsg()
	Local $RandomMsg[10]
	$RandomMsg[0] = "Wrong Password!"
	$RandomMsg[1] = "Step away from the computer."
	$RandomMsg[2] = "Your not Jim."
	$RandomMsg[3] = "Give Up!"
	$RandomMsg[4] = "Don't Touch!"
	$RandomMsg[5] = "Please Enter Correct Password."
	$RandomMsg[6] = "Try Again!"
	$RandomMsg[7] = "Stop pushing my buttons."
	$RandomMsg[8] = "INS! INS!"
	$RandomMsg[9] = "Ctrl-Alt-Dipshit"
	Return $RandomMsg[Random(10)]
EndFunc   ;==>_RandomMsg

Share this post


Link to post
Share on other sites

Posted

A nice script!thanks!

Share this post


Link to post
Share on other sites

Posted (edited)

Hello,

I´m new at Autoit (and new at programming), and i´m working on a script that has nothing to do with computer lock. But I want to do something that this Desktop Locker does: avoid people to stop the script (disable access to the task manager).

When running the Desktop Locker, if I hit CTRL-ALT-DEL and click Task Manager, the Task Manager windows appears, but the Desktop Locker screen soon goes over it, making it impossible to stop any task.

Could any one show me the part of the script that makes it? I´d like to put it in my script.

Thank you all.

Edited by programer

Share this post


Link to post
Share on other sites

Posted

Probably best to have a look at the Help File and learn about GUI creation.

Share this post


Link to post
Share on other sites

Posted (edited)

Hey New To This But This Desktop Locker Is Great ! But I Spotted A Few Errors So I Clean It Up Abit Now Try It :)

#NoTrayIcon
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ScrollBarConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GuiEdit.au3>
#include <Misc.au3>

While 1
    $code = InputBox("Desktop Locker", "Safety. Please Reset Your Password." & @CRLF & @CRLF & "Enter: New Password", Default, "", 350, 150, 200, 400)
    If @error Then
        Exit
    ElseIf $code = '' Then
        ToolTip("Please Enter Your Password In The Spaces.", 370, 300, "Desktop Locker", 1, 0)
        Sleep(3000)
        ToolTip("")
    Else
        $plate = StringReplace($code, "|", @CRLF)
        $Password = $plate
        ExitLoop
    EndIf
WEnd

$btn = MsgBox(36, "Desktop Locker", "You Want To Lock The Screen With This Code (" & $Password & ")? ")
If $btn = 6 Then
    $Locked = GUICreate("Desktop Locker", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
    GUISetBkColor(0x000000, $Locked)

    $Progress1 = GUICtrlCreateProgress((@DesktopWidth - 400) / 2, @DesktopHeight / 2 + 20, 400, 10)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

    GUICtrlCreatePic("lock.gif", 430, 130, 164, 144)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

    $WrongPw = GUICtrlCreateEdit("", 10, 14, 300, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL, $ES_READONLY), 0)
    $InputPw = GUICtrlCreateInput("", @DesktopWidth / 2 - 100, @DesktopHeight / 2 - 10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0)

    GUICtrlCreateLabel("Desktop Locker", @DesktopWidth / 2 - 125, @DesktopHeight / 2 - 95, 260, 50, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 30, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)

    GUICtrlCreateLabel("Please Enter A Password To Unlock The Screen.", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)

    GUICtrlSetFont($WrongPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($WrongPw, 0xFFFFFF)
    GUICtrlSetBkColor($WrongPw, 0x000000)
    GUICtrlSetFont($InputPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($InputPw, 0xFFFFFF)
    GUICtrlSetBkColor($InputPw, 0x000000)

    WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
    GUISetState(@SW_SHOW, $Locked)
    _MouseTrap(@DesktopWidth, @DesktopHeight)

    While 1
        If _IsPressed("0D") Then
            If GUICtrlRead($InputPw) == $Password Then
			   GUICtrlSetData($InputPw, "")
			   GUICtrlCreateLabel("Correct Password ! Unlocking...", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0x66FF00)
                For $i = 1 To 100 Step 2
                    GUICtrlSetData($Progress1, $i)
                    Sleep(50)
                Next
			   GUISetState(@SW_HIDE, $Locked)
			   WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_SHOW)
                _MouseTrap()
				GUICtrlSetData($InputPw, "")
                ExitLoop
            Else
			GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Incorrect Password ! Please Try Again...", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0xFF0000)
			GUICtrlSetData($InputPw, "")
            EndIf
        EndIf
        If Not WinActive("Desktop Locker") Then
			GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Trying To Hack This? :(", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0xFF0000)
			GUICtrlSetData($InputPw, "")
            WinActivate("Desktop Locker")
            _MouseTrap(@DesktopWidth, @DesktopHeight)
        EndIf
    WEnd
Else
    Exit
EndIf

FeedBack Would Be Great :)

Edited by Gedzy

Share this post


Link to post
Share on other sites

Posted

Gedzy,

Works good, but one remark: Why do you use in the For loop for 'unlocking' Step 2???

And if you also have Sleep(50), you get 50*50 = 2500 ms = 2,5 seconds for 'unlocking'.

That's way too long I think...

Share this post


Link to post
Share on other sites

Posted

Gedzy,

Works good, but one remark: Why do you use in the For loop for 'unlocking' Step 2???

And if you also have Sleep(50), you get 50*50 = 2500 ms = 2,5 seconds for 'unlocking'.

That's way too long I think...

Hey There :) well It's to display the text when the password is correct and yeah your right I just like looking at loader load up. I'm also looking for a stronger way for the program to lock the screen I.E. the user may use Ctrl + Alt + Del or Logoff /Try something else - which may cause the program to stop:

 WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
    GUISetState(@SW_SHOW, $Locked)
    _MouseTrap(@DesktopWidth, @DesktopHeight)

If Not WinActive("Desktop Locker") Then

;other code

GUICtrlSetData($InputPw, "")
            WinActivate("Desktop Locker")
            _MouseTrap(@DesktopWidth, @DesktopHeight)

Any help? Thanks Gedzy :)

Share this post


Link to post
Share on other sites

Posted

Great script, but is it possible to make it transparent?

I'm kinda new to this.

Share this post


Link to post
Share on other sites

Posted

yorba,

How do you mean to make it tranparent?? If you mean what I think, you have to use WinSetTrans($Locked, "", [transparency you want to have from 0-255, by example 240]) before GUISetState(@SW_SHOW, $Locked). :)

Share this post


Link to post
Share on other sites

Posted (edited)

yorba,

How do you mean to make it tranparent?? If you mean what I think, you have to use WinSetTrans($Locked, "", [transparency you want to have from 0-255, by example 240]) before GUISetState(@SW_SHOW, $Locked). :)

Ok, will this remove the black background on the lock screen so that I can see my desktop? Sorry if my English is bad.

Edit: It didn't work. Did I do it wrong?

WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
	WinSetTrans("Shell_TrayWnd", "", 10)
    GUISetState(@SW_SHOW, $Locked)
    _MouseTrap(@DesktopWidth, @DesktopHeight)
Edited by yorba

Share this post


Link to post
Share on other sites

Posted (edited)

:) Update

Desktop_Locker.7z v0.2 (+Shortcut, +Startup), screenshot

Setting

970e74f8d5d9.png

Locks the screen

2a57dfcd91d0.png

Edited by AZJIO

Share this post


Link to post
Share on other sites

Posted

Hey Back Again :) Urm Ive added more to the Desktop Locker:

1) System Information Shows

2) Transparency Set Thank to " "

3) Improve Security Can only be closed on Log-off or Closed Remotely

Code:

#NoTrayIcon
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ScrollBarConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GuiEdit.au3>
#include <Misc.au3>
#include <WinAPI.au3>
$var0 = String(@ComputerName)
$var1 = String(@LogonServer)
$var2 = String(@OSVersion)
$var3 = String(@HomeDrive & "\")
$var4 = String(@HomeShare)
IF $var4 = "" Then
	$var4 = String("No HomeShare Exist")
Else
	$var4 = String(@HomeShare)
EndIF
$var5 = String(@IPAddress1)
$var6 = String(@LogonDomain)
$var7 = String(@LogonServer)
$var8 = string(@OSServicePack)
IF $var8 = "" Then
	$var8 = String("No OSServicePack Found")
Else
	$var8 = string(@OSServicePack)
Endif
$var9 = String(@UserName & "," & " " & "Based @" & " " & @UserProfileDir)
While 1
      $code =  InputBox("Desktop Locker", "Computer Information:" & @CRLF & @CRLF & "Logon Server: " & $var1 & @CRLF & "OSVersion: " & $var2 & @CRLF & "Home Drive: " & $var3 & @CRLF  & "Home Share: " & $var4 &@CRLF & "IP Address: " & $var5 & @CRLF & "Logon Domain: " & $var6 & @CRLF & "Logon Sever: " & $var7 & @CRLF & "Server Pack: " & $var8 & @CRLF & "Username: " & $var9 & @CRLF & @CRLF & "Safety. Please Reset Your Password." & @CRLF & @CRLF & "Enter: New Password For " & $var0, Default, "*", 300, 300, 300, 300, 60)
	If @error Then
        Exit
    ElseIf $code = '' Then
        ToolTip("Please Enter Your Password In The Spaces.", 370, 300, "Desktop Locker", 1, 0, BitOR($ES_CENTER, $ES_PASSWORD), "", "*")
    Else
        $plate = StringReplace($code, "*", @CRLF)
        $Password = $plate
        ExitLoop
    EndIf
WEnd
$btn = 0
If $btn = 0 Then
    $Locked = GUICreate("Desktop Locker", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
    GUISetBkColor(0x000000, $Locked)
    $Progress1 = GUICtrlCreateProgress((@DesktopWidth - 400) / 2, @DesktopHeight / 2 + 20, 400, 10)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlCreatePic("lock.gif", 430, 130, 164, 144)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $WrongPw = GUICtrlCreateEdit("", 10, 14, 300, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL, $ES_READONLY), 0)
    $InputPw = GUICtrlCreateInput("", @DesktopWidth / 2 - 100, @DesktopHeight / 2 - 10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0)
    GUICtrlCreateLabel("Desktop Locker", @DesktopWidth / 2 - 125, @DesktopHeight / 2 - 95, 260, 50, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 30, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlCreateLabel("Please Enter A Password To Unlock The Screen.", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlSetFont($WrongPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($WrongPw, 0xFFFFFF)
    GUICtrlSetBkColor($WrongPw, 0x000000)
    GUICtrlSetFont($InputPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($InputPw, 0xFFFFFF)
    GUICtrlSetBkColor($InputPw, 0x000000)
    WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
	WinSetTrans($Locked, "", 230) 
    GUISetState(@SW_SHOW, $Locked)
    _MouseTrap(@DesktopWidth, @DesktopHeight)
    While 1
        If _IsPressed("0D") Then
            If GUICtrlRead($InputPw) == $Password Then
               GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Correct Password ! Unlocking...", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0x66FF00)
                For $i = 1 To 100 Step 10
                    GUICtrlSetData($Progress1, $i)
                    Sleep(50)
                Next
               GUISetState(@SW_HIDE, $Locked)
               WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_SHOW)
                _MouseTrap()
                GUICtrlSetData($InputPw, "")
                ExitLoop
            Else
            GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Incorrect Password ! Please Try Again...", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0xFF0000)
            GUICtrlSetData($InputPw, "")
            EndIf
        EndIf
        If Not WinActive("Desktop Locker") Then
            GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Trying To Hack This? :(", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0xFF0000)
            GUICtrlSetData($InputPw, "")
            WinActivate("Desktop Locker")
            _MouseTrap(@DesktopWidth, @DesktopHeight)
        EndIf
		If ProcessExists("Taskmgr.exe") Then
			ProcessClose("Taskmgr.exe") 
		Endif
    WEnd
Else
    Exit
EndIf

Any Feed Back Or Improvement? Thanks Gedzy :P:)

Share this post


Link to post
Share on other sites

Posted

Hey Back Again :) Urm Ive added more to the Desktop Locker:

1) System Information Shows

2) Transparency Set Thank to " "

3) Improve Security Can only be closed on Log-off or Closed Remotely

Code:

#NoTrayIcon
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ScrollBarConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GuiEdit.au3>
#include <Misc.au3>
#include <WinAPI.au3>
$var0 = String(@ComputerName)
$var1 = String(@LogonServer)
$var2 = String(@OSVersion)
$var3 = String(@HomeDrive & "\")
$var4 = String(@HomeShare)
IF $var4 = "" Then
	$var4 = String("No HomeShare Exist")
Else
	$var4 = String(@HomeShare)
EndIF
$var5 = String(@IPAddress1)
$var6 = String(@LogonDomain)
$var7 = String(@LogonServer)
$var8 = string(@OSServicePack)
IF $var8 = "" Then
	$var8 = String("No OSServicePack Found")
Else
	$var8 = string(@OSServicePack)
Endif
$var9 = String(@UserName & "," & " " & "Based @" & " " & @UserProfileDir)
While 1
      $code =  InputBox("Desktop Locker", "Computer Information:" & @CRLF & @CRLF & "Logon Server: " & $var1 & @CRLF & "OSVersion: " & $var2 & @CRLF & "Home Drive: " & $var3 & @CRLF  & "Home Share: " & $var4 &@CRLF & "IP Address: " & $var5 & @CRLF & "Logon Domain: " & $var6 & @CRLF & "Logon Sever: " & $var7 & @CRLF & "Server Pack: " & $var8 & @CRLF & "Username: " & $var9 & @CRLF & @CRLF & "Safety. Please Reset Your Password." & @CRLF & @CRLF & "Enter: New Password For " & $var0, Default, "*", 300, 300, 300, 300, 60)
	If @error Then
        Exit
    ElseIf $code = '' Then
        ToolTip("Please Enter Your Password In The Spaces.", 370, 300, "Desktop Locker", 1, 0, BitOR($ES_CENTER, $ES_PASSWORD), "", "*")
    Else
        $plate = StringReplace($code, "*", @CRLF)
        $Password = $plate
        ExitLoop
    EndIf
WEnd
$btn = 0
If $btn = 0 Then
    $Locked = GUICreate("Desktop Locker", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
    GUISetBkColor(0x000000, $Locked)
    $Progress1 = GUICtrlCreateProgress((@DesktopWidth - 400) / 2, @DesktopHeight / 2 + 20, 400, 10)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlCreatePic("lock.gif", 430, 130, 164, 144)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $WrongPw = GUICtrlCreateEdit("", 10, 14, 300, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL, $ES_READONLY), 0)
    $InputPw = GUICtrlCreateInput("", @DesktopWidth / 2 - 100, @DesktopHeight / 2 - 10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0)
    GUICtrlCreateLabel("Desktop Locker", @DesktopWidth / 2 - 125, @DesktopHeight / 2 - 95, 260, 50, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 30, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlCreateLabel("Please Enter A Password To Unlock The Screen.", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlSetFont($WrongPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($WrongPw, 0xFFFFFF)
    GUICtrlSetBkColor($WrongPw, 0x000000)
    GUICtrlSetFont($InputPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($InputPw, 0xFFFFFF)
    GUICtrlSetBkColor($InputPw, 0x000000)
    WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
	WinSetTrans($Locked, "", 230) 
    GUISetState(@SW_SHOW, $Locked)
    _MouseTrap(@DesktopWidth, @DesktopHeight)
    While 1
        If _IsPressed("0D") Then
            If GUICtrlRead($InputPw) == $Password Then
               GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Correct Password ! Unlocking...", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0x66FF00)
                For $i = 1 To 100 Step 10
                    GUICtrlSetData($Progress1, $i)
                    Sleep(50)
                Next
               GUISetState(@SW_HIDE, $Locked)
               WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_SHOW)
                _MouseTrap()
                GUICtrlSetData($InputPw, "")
                ExitLoop
            Else
            GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Incorrect Password ! Please Try Again...", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0xFF0000)
            GUICtrlSetData($InputPw, "")
            EndIf
        EndIf
        If Not WinActive("Desktop Locker") Then
            GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Trying To Hack This? :(", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0xFF0000)
            GUICtrlSetData($InputPw, "")
            WinActivate("Desktop Locker")
            _MouseTrap(@DesktopWidth, @DesktopHeight)
        EndIf
		If ProcessExists("Taskmgr.exe") Then
			ProcessClose("Taskmgr.exe") 
		Endif
    WEnd
Else
    Exit
EndIf

Any Feed Back Or Improvement? Thanks Gedzy :P:)

Share this post


Link to post
Share on other sites

Posted (edited)

Hey Back Again :) Urm Ive added more to the Desktop Locker:

1) System Information Shows

2) Transparency Set Thank to AppTux

3) Improve Security Can only be closed on Log-off or Closed Remotely

Code:

#NoTrayIcon
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ScrollBarConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <GuiEdit.au3>
#include <Misc.au3>
#include <WinAPI.au3>
$var0 = String(@ComputerName)
$var1 = String(@LogonServer)
$var2 = String(@OSVersion)
$var3 = String(@HomeDrive & "\")
$var4 = String(@HomeShare)
IF $var4 = "" Then
	$var4 = String("No HomeShare Exist")
Else
	$var4 = String(@HomeShare)
EndIF
$var5 = String(@IPAddress1)
$var6 = String(@LogonDomain)
$var7 = String(@LogonServer)
$var8 = string(@OSServicePack)
IF $var8 = "" Then
	$var8 = String("No OSServicePack Found")
Else
	$var8 = string(@OSServicePack)
Endif
$var9 = String(@UserName & "," & " " & "Based @" & " " & @UserProfileDir)
While 1
      $code =  InputBox("Desktop Locker", "Computer Information:" & @CRLF & @CRLF & "Logon Server: " & $var1 & @CRLF & "OSVersion: " & $var2 & @CRLF & "Home Drive: " & $var3 & @CRLF  & "Home Share: " & $var4 &@CRLF & "IP Address: " & $var5 & @CRLF & "Logon Domain: " & $var6 & @CRLF & "Logon Sever: " & $var7 & @CRLF & "Server Pack: " & $var8 & @CRLF & "Username: " & $var9 & @CRLF & @CRLF & "Safety. Please Reset Your Password." & @CRLF & @CRLF & "Enter: New Password For " & $var0, Default, "*", 300, 300, 300, 300, 60)
	If @error Then
        Exit
    ElseIf $code = '' Then
        ToolTip("Please Enter Your Password In The Spaces.")
    Else
        $plate = StringReplace($code, "*", @CRLF)
        $Password = $plate
        ExitLoop
    EndIf
WEnd
$btn = 0
If $btn = 0 Then
    $Locked = GUICreate("Desktop Locker", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
    GUISetBkColor(0x000000, $Locked)
    $Progress1 = GUICtrlCreateProgress((@DesktopWidth - 400) / 2, @DesktopHeight / 2 + 20, 400, 10)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlCreatePic("lock.gif", 430, 130, 164, 144)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $WrongPw = GUICtrlCreateEdit("", 10, 14, 300, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL, $ES_READONLY), 0)
    $InputPw = GUICtrlCreateInput("", @DesktopWidth / 2 - 100, @DesktopHeight / 2 - 10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0)
    GUICtrlCreateLabel("Desktop Locker", @DesktopWidth / 2 - 125, @DesktopHeight / 2 - 95, 260, 50, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 30, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlCreateLabel("Please Enter A Password To Unlock The Screen.", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
    GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlSetFont($WrongPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($WrongPw, 0xFFFFFF)
    GUICtrlSetBkColor($WrongPw, 0x000000)
    GUICtrlSetFont($InputPw, 12, 800, 0, "MS Sans Serif")
    GUICtrlSetColor($InputPw, 0xFFFFFF)
    GUICtrlSetBkColor($InputPw, 0x000000)
    WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
	WinSetTrans($Locked, "", 240) 
    GUISetState(@SW_SHOW, $Locked)
    _MouseTrap(@DesktopWidth, @DesktopHeight)
    While 1
        If _IsPressed("0D") Then
            If GUICtrlRead($InputPw) == $Password Then
               GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Correct Password ! Unlocking...", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0x66FF00)
                For $i = 1 To 100 Step 10
                    GUICtrlSetData($Progress1, $i)
                    Sleep(50)
                Next
               GUISetState(@SW_HIDE, $Locked)
               WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_SHOW)
                _MouseTrap()
                GUICtrlSetData($InputPw, "")
                ExitLoop
            Else
            GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Incorrect Password ! Please Try Again...", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0xFF0000)
            GUICtrlSetData($InputPw, "")
            EndIf
        EndIf
        If Not WinActive("Desktop Locker") Then
            GUICtrlSetData($InputPw, "")
               GUICtrlCreateLabel("Trying To Hack This? :(", @DesktopWidth / 2 - 185, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
               GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
               GUICtrlSetColor(-1, 0xFF0000)
            GUICtrlSetData($InputPw, "")
            WinActivate("Desktop Locker")
            _MouseTrap(@DesktopWidth, @DesktopHeight)
        EndIf
		If ProcessExists("Taskmgr.exe") Then
			ProcessClose("Taskmgr.exe") 
		Endif
    WEnd
Else
    Exit
EndIf

Any Feed Back Or Improvement? Thanks Gedzy :P:)

Edited by Gedzy

Share this post


Link to post
Share on other sites

Posted

AutoscriptsIT.com - I Don't Think Your Delete Button Work's ??? I Won't Delete My Post Sorry For Spamming LOL

Share this post


Link to post
Share on other sites

Posted

Gedzy,

Don't you have a Edit button in the right-bottom corner of your post? It's really, really pretty horribly annoying if you post almost the same post but with a bit difference. I don't know how much posts you need to have before you can edit and remove posts... I forgot that. :)

Share this post


Link to post
Share on other sites

Posted (edited)

@Gedzy : lines 37 of your script don't work. Make sure it works before posting it.

ToolTip("Please Enter Your Password In The Spaces.", 370, 300, "Desktop Locker", 1, 0, BitOR($ES_CENTER, $ES_PASSWORD), "", "*")
for
ToolTip("Please Enter Your Password In The Spaces.", Default, Default , "Desktop Locker", 1, 0)
Nice script btw Posted Image Edited by Jayson

Share this post


Link to post
Share on other sites

Posted

@Gedzy : lines 37 of your script don't work. Make sure it works before posting it.

ToolTip("Please Enter Your Password In The Spaces.", 370, 300, "Desktop Locker", 1, 0, BitOR($ES_CENTER, $ES_PASSWORD), "", "*")
for
ToolTip("Please Enter Your Password In The Spaces.)
Nice script btw Posted Image

Cool Man Thanks For That

Share this post


Link to post
Share on other sites

Posted

Gedzy,

I would recommend to make the window a bit less transparent: Something like a transparency of 240.

Share this post


Link to post
Share on other sites

Posted

Gedzy,

Don't you have a Edit button in the right-bottom corner of your post? It's really, really pretty horribly annoying if you post almost the same post but with a bit difference. I don't know how much posts you need to have before you can edit and remove posts... I forgot that. :)

Yeah I can understand ! Urm yeah One saying "Delete" Another Saying "Edit" And One Saying "Reply" So I click on the "Delete" button a messsage comes up from AutoIT saying Delete this post (YES|NO) I click yes and then it does nothing LOL :)

Share this post


Link to post
Share on other sites

Posted

Gedzy,

I would recommend to make the window a bit less transparent: Something like a transparency of 240.

Ok Coolies I have it set to 230 so yeah I think its a pretty cool program ! specialy when it comes to college :)

Share this post


Link to post
Share on other sites

Posted

@Gedzy : I have cleaned some stuff so you can see how to optimize your scirpt by the way Posted Image

Here's the code :

#NoTrayIcon
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <Misc.au3>
#include <array.au3>

Global $aData[9] = [ @ComputerName, @LogonServer, @OSVersion, @HomeDrive & '\', @HomeShare, @IPAddress1, @LogonDomain, @OSServicePack, @UserName & ',' & ' ' & 'Based @' & ' ' & @UserProfileDir ]

IF $aData[4] = '' Then
    $aData[4] = 'No HomeShare Exist'
Else
    $aData[4] = @HomeShare
EndIF
IF $aData[7] = '' Then
    $aData[7] = 'No OSServicePack Found'
Else
    $aData[7] = @OSServicePack
Endif
While 1
	$code =  InputBox('Desktop Locker', 'Computer Informations' & @CRLF & @CRLF & 'Logon Server: ' & $aData[1] & @CRLF & 'OS Version: ' & $aData[2] & @CRLF & 'Home Drive: ' & $aData[3] & @CRLF  & 'Home Share: ' & $aData[4] & @CRLF & 'IP Address: ' & $aData[5] & @CRLF & 'Logon Domain: ' & $aData[6] & @CRLF & 'Server Pack: ' & $aData[7] & @CRLF & 'Username: ' & $aData[8] & @CRLF & @CRLF & 'For safety purpose,' & @CRLF & @CRLF & 'Please enter your password for ' & $aData[0], Default, '*M10', 300, 305, 300, 300)
	If @error Then
		Exit
	Else
		Exitloop
	EndIf
WEnd

$Locked = GUICreate('Desktop Locker', @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
GUISetBkColor(0x000000, $Locked)
$Progress1 = GUICtrlCreateProgress((@DesktopWidth - 400) / 2, @DesktopHeight / 2 + 20, 400, 10)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlCreatePic('lock.gif', 430, 130, 164, 144)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$WrongPw = GUICtrlCreateEdit('', 10, 14, 300, @DesktopHeight - 14, BitOR($ES_AUTOVSCROLL, $ES_READONLY), 0)
GUICtrlSetFont(-1, 12, 800, 0, 'MS Sans Serif')
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$InputPw = GUICtrlCreateInput('', @DesktopWidth / 2 - 100, @DesktopHeight / 2 - 10, 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0)
GUICtrlSetFont(-1, 12, 800, 0, 'MS Sans Serif')
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlCreateLabel('Desktop Locker', @DesktopWidth / 2 - 125, @DesktopHeight / 2 - 95, 260, 50, $ES_CENTER, 0)
GUICtrlSetFont(-1, 30, 800, 0, 'MS Sans Serif')
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$labelPw = GUICtrlCreateLabel('Please enter a password to unlock the desktop.', @DesktopWidth / 2 - 195, @DesktopHeight / 2 - 50, 400, 20, $ES_CENTER, 0)
GUICtrlSetFont(-1, 12, 800, 0, 'MS Sans Serif')
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
WinSetState('[CLASS:Shell_TrayWnd]', '', @SW_HIDE)
WinSetTrans($Locked, '', 240)
GUISetState()
_MouseTrap(@DesktopWidth, @DesktopHeight)

While 1

	If _IsPressed('0D') Then
        If GUICtrlRead($InputPw) == $code Then
            GUICtrlSetData($InputPw, '')
            GUICtrlSetData($labelPw, 'Correct password ! Unlocking...')
            GUICtrlSetFont(-1, 12, 800, 0, 'MS Sans Serif')
            GUICtrlSetColor(-1, 0x66FF00)
            For $i = 1 To 100 Step 5
                GUICtrlSetData($Progress1, $i)
                Sleep(50)
            Next
            WinSetState('[CLASS:Shell_TrayWnd]', '', @SW_SHOW)
            Exit
        Else
			GUICtrlSetData($InputPw, '')
            GUICtrlSetData($labelPw, 'Wrong password.  Please try again...')
            GUICtrlSetFont(-1, 12, 800, 0, 'MS Sans Serif')
            GUICtrlSetColor(-1, 0xFF0000)
		EndIf
	EndIf

    If Not WinActive('Desktop Locker') Then
        GUICtrlSetData($labelPw, 'Trying to hack this? <img src='http://www.autoitscript.com/forum/public/style_emoticons/<#EMO_DIR#>/sad.png' class='bbc_emoticon' alt=':(' />')
        GUICtrlSetFont(-1, 12, 800, 0, 'MS Sans Serif')
        GUICtrlSetColor(-1, 0xFF0000)
        WinActivate('Desktop Locker')
        _MouseTrap(@DesktopWidth, @DesktopHeight)
    EndIf

    If ProcessExists('Taskmgr.exe') Then
        ProcessClose('Taskmgr.exe')
    Endif
WEnd

Share this post


Link to post
Share on other sites

Posted

Share this post


Link to post
Share on other sites

Posted

Hello again urm I wanted to create/place a picture above the text "Desktop Locker" but when a use

GUTCTRLCreatePic(blah)
the color resolution has dropped making it pixelated :\ It would be nice to have an image above the text but can't figure out how to do it any help? Thank's Gedzy

I.E. Of Image of a lock - Icon Website

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.