Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Desktop Locker


  • Please log in to reply
36 replies to this topic

#1 sak

sak

    Seeker

  • Active Members
  • 47 posts

Posted 10 March 2011 - 03:35 AM

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

Plain Text         
#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







#2 AppTux

AppTux

    Adventurer

  • Active Members
  • PipPip
  • 130 posts

Posted 10 March 2011 - 03:54 PM

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:
AutoIt         
#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

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.

#3 chong

chong

    Seeker

  • Active Members
  • 8 posts

Posted 11 March 2011 - 07:49 AM

A nice script!thanks!
Try to face everything troubles you.nothing is impossible!

#4 programer

programer

    Seeker

  • Active Members
  • 8 posts

Posted 17 March 2011 - 08:05 PM

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, 17 March 2011 - 08:11 PM.


#5 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 16,890 posts

Posted 17 March 2011 - 08:11 PM

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

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 20/07/2014


#6 Gedzy

Gedzy

    Seeker

  • Active Members
  • 13 posts

Posted 24 March 2011 - 05:29 PM

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 :)

Plain Text         
#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, 24 March 2011 - 05:32 PM.


#7 AppTux

AppTux

    Adventurer

  • Active Members
  • PipPip
  • 130 posts

Posted 24 March 2011 - 06:00 PM

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...
PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.

#8 Gedzy

Gedzy

    Seeker

  • Active Members
  • 13 posts

Posted 24 March 2011 - 09:43 PM

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 :)

#9 Guest_yorba_*

Guest_yorba_*
  • Guests

Posted 25 March 2011 - 10:56 AM

Great script, but is it possible to make it transparent?
I'm kinda new to this.

#10 AppTux

AppTux

    Adventurer

  • Active Members
  • PipPip
  • 130 posts

Posted 25 March 2011 - 12:11 PM

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). :)
PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.

#11 Guest_yorba_*

Guest_yorba_*
  • Guests

Posted 25 March 2011 - 02:16 PM

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, 25 March 2011 - 02:29 PM.


#12 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,580 posts

Posted 25 March 2011 - 03:46 PM

:) Update
Desktop_Locker.7z v0.2 (+Shortcut, +Startup), screenshot
Plain Text         
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_OutFile=Desktop_Locker.exe #AutoIt3Wrapper_icon=Desktop_Locker.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseAnsi=y #AutoIt3Wrapper_Res_Comment=- #AutoIt3Wrapper_Res_Description=Desktop_Locker.exe #AutoIt3Wrapper_Res_Fileversion=0.2.0.0 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=n #AutoIt3Wrapper_Res_LegalCopyright=AZJIO #AutoIt3Wrapper_Res_Language=1049 #AutoIt3Wrapper_Run_AU3Check=n #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/StripOnly #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;  @AZJIO 8.05.2011  (AutoIt3_v3.3.6.1) ; HotKeySet("{ESC}", "_Exit") ; Func _Exit()     ; Exit ; EndFunc #NoTrayIcon #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <ComboConstants.au3> #Include <String.au3> #Include <Array.au3> Global Const $ES_CENTER = 1 Global Const $ES_PASSWORD = 32 Global Const $tagRECT = "long Left;long Top;long Right;long Bottom" Global $Password='', $k=0, $aSet, $Gui1, $ValSld Global $DW=@DesktopWidth, $DH=@DesktopHeight ; En $LngTitle='Desktop Locker' $LngAbout='About' $LngVer='Version' $LngCopy='Copy' $LngSite='Site' $LngLDP='Desktop Locker' $LngPsw='Password to unlock' $LngChB='Hide password' ; $LngMs1='You want to lock the screen?' $LngErPw1='The password is incorrect ..try again.' $LngErPw2='Please enter a password to unlock the screen'&@CRLF&'and press Enter.' $LngERe='Display output and restart' $LngDly='Delay' $LngMsB='Block mouse' $LngTrn='Transparency' $LngDsc='Desktop' $LngQLn='Quick Launch' $LngMPr='Main Menu' $LngLnk='Shortcut on' $LngSTp='Lock desktop with password' $LngLnkH='Create a shortcut with an encrypted password' $LngRgt='Startup' $LngRgtH='Losing a password will require professional help' $LngMs2='Message' $LngMs3='The key in the registry is missing, perhaps not right to write to the registry' $LngMs4='Key successfully added' $LngMs5='The key was successfully removed' $LngMs6='The key is exists, maybe not the right to delete' $LngErr='Error' $Lang_dll = DllOpen("kernel32.dll") $UserIntLang=DllCall ( $Lang_dll, "int", "GetUserDefaultUILanguage" ) If Not @error Then $UserIntLang=Hex($UserIntLang[0],4) DllClose($Lang_dll) ; Ru ; если русская локализация, то русский язык If $UserIntLang = 0419 Then     ; $LngTitle='Desktop Locker'     $LngAbout='О программе'     $LngVer='Версия'     $LngCopy='Копировать'     $LngSite='Сайт'     $LngLDP='Заблокировать рабочий стол'     $LngPsw='Пароль для разблокировки'     $LngChB='Скрыть пароль'     ; $LngMs1='Вы хотите заблокировать просмотр и управление Рабочего стола?'     $LngErPw1='Пароль неверный, попробуйте снова.'     $LngErPw2='Пожалуйста, введите пароль для разблокировки экрана'&@CRLF&'и нажмите Enter.'     $LngERe='Отображать выход и перезагрузка'     $LngDly='Задержка'     $LngMsB='Блокировать мышь'     $LngTrn='Прозрачность'     $LngDsc='Рабочий стол'     $LngQLn='Быстрый запуск'     $LngMPr='Главное меню'     $LngLnk='Ярлык на'     $LngSTp='Заблокировать рабочий стол с паролем'     $LngLnkH='Создать ярлык с шифрованным паролем'     $LngRgt='Автозагрузка'     $LngRgtH='Потеря пароля потребует помощи профессионала'     $LngMs2='Сообщение'     $LngMs3='Ключ в реестре отсутствует, возможно нет прав на запись в реестр'     $LngMs4='Ключ успешно добавлен'     $LngMs5='Ключ успешно удалён'     $LngMs6='Ключ существует, возможно нет прав на удаление'     $LngErr='Ошибка' EndIf Global $Ini = @ScriptDir & '\DesktopLocker.ini' If Not FileExists($Ini) And DriveStatus(StringLeft(@ScriptDir, 1))<>'NOTREADY' Then     _FileW() EndIf Func _FileW($i='1|0|0|1|255')     $file = FileOpen($Ini,2)     FileWrite($file, $i)     FileClose($file) EndFunc Func _MsgFile()     $file = FileOpen($Ini, 0)     $Initext = FileRead($file)     FileClose($file)     $aSet = StringSplit($Initext, '|')     If $aSet[0]<>5 Then         $Initext='1|0|0|1|255'         _FileW($Initext)         $aSet = StringSplit($Initext, '|')     EndIf     Local $ChPsHd, $Inp0, $Inp1, $Inp2, $msg, $OK, $Password=''     $Gui1 = GUICreate($LngLDP, 290, 270, -1, -1, $WS_CAPTION+$WS_SYSMENU)     If Not @compiled Then GUISetIcon(@ScriptDir&'\Desktop_Locker.ico')         GUICtrlCreateGroup($LngPsw, 5, 5, 200, 72)     ; GUICtrlCreateLabel($LngPsw, 10, 13, 190, 17)     $Inp1=GUICtrlCreateInput('', 10, 25, 190, 22)     $Inp2=GUICtrlCreateInput('', 10, 25, 190, 22, $ES_PASSWORD)     $ChPsHd=GUICtrlCreateCheckbox($LngChB, 10, 55, 170, 15)     If $aSet[1] = $GUI_CHECKED Then         GUICtrlSetState($Inp2, $GUI_FOCUS)         GUICtrlSetState($Inp1, $GUI_HIDE)         $Inp0=$Inp2         GUICtrlSetState($ChPsHd, $GUI_CHECKED)     Else         GUICtrlSetState($Inp1, $GUI_FOCUS)         GUICtrlSetState($Inp2, $GUI_HIDE)         $Inp0=$Inp1         GUICtrlSetState($ChPsHd, $GUI_UNCHECKED)     EndIf         GUICtrlCreateGroup('', 5, 78, 200, 79)     $ShtDwn=GUICtrlCreateCheckbox($LngERe, 10, 90, 190, 15)     If $aSet[2]=$GUI_CHECKED Then GUICtrlSetState(-1, 1)     $DelayL=GUICtrlCreateLabel($LngDly&' :', 10, 113, 70, 17)     $Delay=GUICtrlCreateCombo('', 80, 110, 60)     GUICtrlSetData(-1,'0|1|10|30|60|120', '0')     GUICtrlSetData(-1,$aSet[3], $aSet[3])     $MsBloc=GUICtrlCreateCheckbox($LngMsB, 10, 137, 190, 15)     If $aSet[4]=$GUI_CHECKED Then         GUICtrlSetState($MsBloc, $GUI_CHECKED)     Else         GUICtrlSetState($MsBloc, $GUI_UNCHECKED)     EndIf     $About=GUICtrlCreateButton('@', 235, 30, 30, 30)     GUICtrlSetTip(-1, $LngAbout)     GUICtrlSetFont(-1,13)     GUICtrlCreateIcon ("shell32.dll", 48, 230, 91, 48, 48)         $OK=GUICtrlCreateButton('OK', 215, 190, 60, 50)     GUICtrlSetState(-1, $GUI_DEFBUTTON)     GUICtrlSetFont(-1,13)     If GUICtrlRead($ShtDwn)=4 Then         GUICtrlSetState($Delay, $GUI_DISABLE)         GUICtrlSetState($DelayL, $GUI_DISABLE)     EndIf         GUICtrlCreateGroup($LngTrn, 5, 159, 200, 50)     $slider1 = GUICtrlCreateSlider(6, 173, 163, 30)     GUICtrlSetLimit(-1, 100, 0)     GUICtrlSetTip(-1, $LngTrn)     GUICtrlSetData(-1, 255-$aSet[5])     $ValSld=GUICtrlCreateLabel(255-$aSet[5], 169, 178, 30, 17)     GUICtrlSetFont(-1,12)     WinSetTrans($Gui1,"",$aSet[5])         GUICtrlCreateLabel($LngLnk&' :', 10, 218, 60, 17)     $LinkCombo=GUICtrlCreateCombo('', 65, 215, 112, 22, $CBS_DROPDOWNLIST)     GUICtrlSetData(-1, $LngDsc&'|'&$LngQLn&'|'&$LngMPr, $LngDsc)     $CreateLnk=GUICtrlCreateButton('>', 180, 215, 22, 24)     GUICtrlSetTip(-1, $LngLnkH)         $Registry=GUICtrlCreateCheckbox($LngRgt, 10, 245, 180, 15)     GUICtrlSetTip(-1, $LngRgtH)     RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 'Desktop_Locker_456')     If Not @Error Then GUICtrlSetState($Registry, $GUI_CHECKED)         GUISetState()     While 1         $msg = GUIGetMsg()         Switch $msg             Case $Registry ; Автозагрузка                 If GUICtrlRead($Registry)=$GUI_CHECKED Then                     $Password = GUICtrlRead($Inp0)                     If $Password = '' Then                         GUICtrlSetState($Registry, $GUI_UNCHECKED)                         _ColorError($Inp0)                         GUICtrlSetState($Inp0, $GUI_FOCUS)                         ContinueLoop                     EndIf                                     $aSet[3] = GUICtrlRead($Delay)                     $aSet[4] = GUICtrlRead($MsBloc)                     $aSet[5]=255-GUICtrlRead($slider1)                     $Initext=$aSet[1]&'|'&$aSet[2]&'|'&$aSet[3]&'|'&$aSet[4]&'|'&$aSet[5]                                     $bEncrypted = _StringEncrypt(1, $Password, $Password)&'J'&_StringEncrypt(1, $Initext, 'dk3wo6e9ru')                     RegWrite("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 'Desktop_Locker_456', "REG_SZ", '"'&@ScriptFullPath&'" '&$bEncrypted)                     RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 'Desktop_Locker_456')                     If @Error Then                         MsgBox(0, $LngErr, $LngMs3)                         GUICtrlSetState($Registry, $GUI_UNCHECKED)                     Else                         MsgBox(0, $LngMs2, $LngMs4)                     EndIf                 Else                     RegDelete("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 'Desktop_Locker_456')                     RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 'Desktop_Locker_456')                     If @Error Then                         MsgBox(0, $LngMs2, $LngMs5)                     Else                         MsgBox(0, $LngErr, $LngMs6)                         GUICtrlSetState($Registry, $GUI_CHECKED)                     EndIf                 EndIf             Case $CreateLnk ; создание ярлыка                 $Password = GUICtrlRead($Inp0)                 If $Password = '' Then                     _ColorError($Inp0)                     GUICtrlSetState($Inp0, $GUI_FOCUS)                     ContinueLoop                 EndIf                                 $aSet[3] = GUICtrlRead($Delay)                 $aSet[4] = GUICtrlRead($MsBloc)                 $aSet[5]=255-GUICtrlRead($slider1)                 $Initext=$aSet[1]&'|'&$aSet[2]&'|'&$aSet[3]&'|'&$aSet[4]&'|'&$aSet[5]                                 $bEncrypted = _StringEncrypt(1, $Password, $Password)&'J'&_StringEncrypt(1, $Initext, 'dk3wo6e9ru')                 Switch GUICtrlRead($LinkCombo)                     Case $LngDsc                         $PathLnk=@DesktopDir & "\Desktop_Locker.lnk"                     Case $LngQLn                         $PathLnk=@AppDataDir&'\Microsoft\Internet Explorer\Quick Launch\Desktop_Locker.lnk'                     Case $LngMPr                         $PathLnk=@ProgramsDir & "\Desktop_Locker.lnk"                 EndSwitch                 FileCreateShortcut(@ScriptDir & "\Desktop_Locker.exe", $PathLnk, @ScriptDir, $bEncrypted, $LngSTp, @ScriptDir & "\Desktop_Locker.exe")             Case $MsBloc, $Delay                 GUICtrlSetState($Inp0, $GUI_FOCUS)             Case $OK ; Заблокировать рабочий стол                 $Password = GUICtrlRead($Inp0)                 If $Password = '' Then                     _ColorError($Inp0)                     GUICtrlSetState($Inp0, $GUI_FOCUS)                     ContinueLoop                 EndIf                 $Password=_StringEncrypt(1, $Password, $Password)                 $aSet[3] = GUICtrlRead($Delay)                 $aSet[4] = GUICtrlRead($MsBloc)                 $aSet[5]=255-GUICtrlRead($slider1)                 $Initext1=$aSet[1]&'|'&$aSet[2]&'|'&$aSet[3]&'|'&$aSet[4]&'|'&$aSet[5]                 If $Initext1<>$Initext Then _FileW($Initext1)                 GUIDelete($Gui1)                 ExitLoop             Case $ShtDwn                 If GUICtrlRead($ShtDwn)=$GUI_CHECKED Then                     $stt=$GUI_ENABLE                     $aSet[2]=$GUI_CHECKED                 Else                     $stt=$GUI_DISABLE                     $aSet[2]=$GUI_UNCHECKED                 EndIf                 GUICtrlSetState($Delay, $stt)                 GUICtrlSetState($DelayL, $stt)                 GUICtrlSetState($Inp0, $GUI_FOCUS)             Case $ChPsHd                 If GUICtrlRead($ChPsHd)=$GUI_CHECKED Then                     GUICtrlSetData($Inp2,GUICtrlRead($Inp1))                     GUICtrlSetState($Inp2, $GUI_SHOW)                     GUICtrlSetState($Inp1, $GUI_HIDE)                     $Inp0=$Inp2                     $aSet[1]=$GUI_CHECKED                 Else                     GUICtrlSetData($Inp1,GUICtrlRead($Inp2))                     GUICtrlSetState($Inp1, $GUI_SHOW)                     GUICtrlSetState($Inp2, $GUI_HIDE)                     $Inp0=$Inp1                     $aSet[1]=$GUI_UNCHECKED                 EndIf                 GUICtrlSetState($Inp0, $GUI_FOCUS)             Case $About                _About()             Case -3                 Exit         EndSwitch     WEnd     Return $Password EndFunc GUIRegisterMsg(0x0114 , "WM_HSCROLL") If $CmdLine[0]>0 Then     $aTmp =  StringSplit($CmdLine[1], 'J')     If @error Or $aTmp[0]<>2 Then         MsgBox(0, $LngErr, $LngErr)         Exit     EndIf     $Password =  $aTmp[1]     $bEncrypted = _StringEncrypt(0, $aTmp[2], 'dk3wo6e9ru')     $aSet =  StringSplit($bEncrypted, '|')     If $aSet[0]<>5 Then         $Initext='1|0|0|1|255'         $aSet = StringSplit($Initext, '|')     EndIf Else     $Password = _MsgFile() EndIf HotKeySet('{ENTER}', '_Enter') $GuiLocked = GUICreate($LngTitle, $DW, $DH, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor (0x0) GUICtrlCreateIcon ("shell32.dll", 48, $DW / 2 - 16, $DH / 2-190, 48, 48) GUISetFont(12, 800) $WrongPw = GUICtrlCreateLabel("", $DW / 2+155, $DH / 2 - 115, 30, 20) GUICtrlSetColor(-1, 0xFF0000) GUICtrlSetBkColor(-1, 0x0) GUICtrlCreateLabel($LngTitle, $DW / 2 - 150, $DH / 2 - 105, 300, 50, $ES_CENTER) GUICtrlSetFont(-1, 30, 800) _Color(-1) GUICtrlCreateLabel($LngErPw2, $DW / 2 - 230, $DH / 2 - 50, 460, 40, $ES_CENTER) _Color(-1) $InputPw = GUICtrlCreateInput("", $DW / 2 - 100, $DH / 2 , 200, 20, BitOR($ES_CENTER, $ES_PASSWORD), 0) _Color(-1) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetState(-1, $GUI_FOCUS) $ShtDw=GUICtrlCreateButton('1', $DW-200, $DH-100, 36, 32, 0x0040) GUICtrlSetImage(-1, @SystemDir & '\shell32.dll', 28, 1) GUICtrlSetState(-1, $GUI_HIDE) $ShtRe=GUICtrlCreateButton('1', $DW-140, $DH-97, 36, 26, 0x0040) GUICtrlSetImage(-1, @SystemDir & '\shell32.dll', -113, 1) GUICtrlSetState(-1, $GUI_HIDE) If $aSet[2]=$GUI_CHECKED Then     If $aSet[3]=0 Then         _Button()     Else         AdlibRegister('_Delay', $aSet[3]*60000)     EndIf EndIf WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE) WinSetTrans($GuiLocked, '', $aSet[5]) GUISetState(@SW_SHOW, $GuiLocked) If $aSet[4] = 1 Then _MouseTrap($DW, $DH) While 1     Sleep(50)     $msg = GUIGetMsg()     If Not WinActive($GuiLocked) Then         If ProcessExists('taskmgr.exe') Then ProcessClose('taskmgr.exe')         WinActivate($GuiLocked)         If $aSet[4] = 1 Then _MouseTrap($DW, $DH)     EndIf     Switch $msg         Case $ShtDw            Shutdown(1)         Case $ShtRe            Shutdown(2)     EndSwitch WEnd Func _ColorError($Inp0)     For $i = 1 to 4         GUICtrlSetBkColor ($Inp0, 0xff0000)         Sleep(40)         GUICtrlSetBkColor ($Inp0, -1 )         Sleep(40)     Next EndFunc Func _Enter()     $tmp=GUICtrlRead($InputPw)     If _StringEncrypt(0, $Password, $tmp) == $tmp Then         WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_SHOW)         If $aSet[4] = 1 Then _MouseTrap()         Exit     Else         $k+=1         GUICtrlSetData($WrongPw, $k)         GUICtrlSetData($InputPw, "")         AdlibRegister('_Tip', 50)     EndIf EndFunc Func _Delay()     AdlibUnRegister('_Delay')     _Button() EndFunc Func _Button()     GUICtrlSetState($ShtDw, $GUI_SHOW)     GUICtrlSetState($ShtRe, $GUI_SHOW) EndFunc Func _Color($i)     GUICtrlSetColor($i, 0xFFFFFF)     GUICtrlSetBkColor($i, 0) EndFunc Func _Tip()     AdlibUnRegister('_Tip')     ToolTip($LngErPw1, $DW/2, $DH/2+20, "", 3, 3)     Sleep(2000)     ToolTip("") EndFunc ; UDF GuiEdit.au3 + Misc.au3 Func _MouseTrap($iLeft = 0, $iTop = 0, $iRight = 0, $iBottom = 0)     Local $aResult     If @NumParams == 0 Then         $aResult = DllCall("user32.dll", "bool", "ClipCursor", "ptr", 0)         If @error Or Not $aResult[0] Then Return SetError(1, _WinAPI_GetLastError(), False)     Else         If @NumParams == 2 Then             $iRight = $iLeft + 1             $iBottom = $iTop + 1         EndIf         Local $tRect = DllStructCreate($tagRECT)         DllStructSetData($tRect, "Left", $iLeft)         DllStructSetData($tRect, "Top", $iTop)         DllStructSetData($tRect, "Right", $iRight)         DllStructSetData($tRect, "Bottom", $iBottom)         $aResult = DllCall("user32.dll", "bool", "ClipCursor", "ptr", DllStructGetPtr($tRect))         If @error Or Not $aResult[0] Then Return SetError(2, _WinAPI_GetLastError(), False)     EndIf     Return True EndFunc   ;==>_MouseTrap Func _WinAPI_GetLastError($curErr = @error, $curExt = @extended)     Local $aResult = DllCall("kernel32.dll", "dword", "GetLastError")     Return SetError($curErr, $curExt, $aResult[0]) EndFunc   ;==>_WinAPI_GetLastError Func WM_HSCROLL($hWnd, $Msg, $wParam, $lParam)     #forceref $Msg, $wParam, $lParam     Local $nScrollCode = BitAND($wParam, 0x0000FFFF)     $aSet[5] = 255-BitShift($wParam, 16)     If $nScrollCode = 5 Then         WinSetTrans($Gui1,"",$aSet[5])         GUICtrlSetData($ValSld, 255-$aSet[5])     EndIf     Return 'GUI_RUNDEFMSG' EndFunc Func _About() Local $GP = WinGetPos($Gui1) GUISetState(@SW_DISABLE, $Gui1) Local $y=$GP[1]+$GP[3]/2-105 Local $x=$GP[0]+$GP[2]/2-105 If $y < 0 Then $y= 0 If $x < 0 Then $x= 0 If $y > $DH-180 Then $y = $DH-208 If $x > $DW-210 Then $x = $DW-216 Local $font="Arial"     Local $Gui2 = GUICreate($LngAbout, 210, 180, $x, $y, -1, 0x00000080,$Gui1)     GUISetBkColor (0xffca48)     GUICtrlCreateLabel($LngTitle, 0, 0, 210, 63, 0x01+0x0200)     GUICtrlSetFont (-1,14, 600, -1, $font)     GUICtrlSetColor(-1,0xa13d00)     GUICtrlSetBkColor (-1, 0xfbe13f)     GUICtrlCreateLabel ("-", 2,64,208,1,0x10)         GUISetFont (9, 600, -1, $font)     GUICtrlCreateLabel($LngVer&' 0.2   8.05.2011', 15, 100, 210, 17)     GUICtrlCreateLabel($LngSite&':', 15, 115, 40, 17)     $url=GUICtrlCreateLabel('http://azjio.ucoz.ru', 52, 115, 170, 17)     GUICtrlSetCursor(-1, 0)     GUICtrlSetColor(-1, 0x0000ff)     GUICtrlCreateLabel('WebMoney:', 15, 130, 85, 17)     $WbMn=GUICtrlCreateLabel('R939163939152', 90, 130, 125, 17)     GUICtrlSetColor(-1,0xa21a10)     GUICtrlSetTip(-1, $LngCopy)     GUICtrlSetCursor(-1, 0)     GUICtrlCreateLabel('Copyright AZJIO © 2010', 15, 145, 210, 17)     GUISetState(@SW_SHOW, $Gui2)     While 1     $msg = GUIGetMsg()     Select         Case $msg = $url             ShellExecute ('http://azjio.ucoz.ru')         Case $msg = $WbMn             ClipPut('R939163939152')         Case $msg = -3             $msg = $Gui1             GUISetState(@SW_ENABLE, $Gui1)             GUIDelete($Gui2)             ExitLoop         EndSelect     WEnd EndFunc

Edited by AZJIO, 08 May 2011 - 02:29 AM.


#13 Gedzy

Gedzy

    Seeker

  • Active Members
  • 13 posts

Posted 29 March 2011 - 06:28 PM

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:

Plain Text         
#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 :)

#14 Gedzy

Gedzy

    Seeker

  • Active Members
  • 13 posts

Posted 29 March 2011 - 06:28 PM

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:

Plain Text         
#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 :)

#15 Gedzy

Gedzy

    Seeker

  • Active Members
  • 13 posts

Posted 29 March 2011 - 06:30 PM

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:

Plain Text         
#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, 29 March 2011 - 07:02 PM.


#16 Gedzy

Gedzy

    Seeker

  • Active Members
  • 13 posts

Posted 29 March 2011 - 06:37 PM

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

#17 AppTux

AppTux

    Adventurer

  • Active Members
  • PipPip
  • 130 posts

Posted 29 March 2011 - 06:47 PM

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. :)
PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.

#18 Jayson

Jayson

    Prodigy

  • Active Members
  • PipPipPip
  • 175 posts

Posted 29 March 2011 - 06:51 PM

@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, 29 March 2011 - 06:54 PM.


#19 Gedzy

Gedzy

    Seeker

  • Active Members
  • 13 posts

Posted 29 March 2011 - 06:53 PM

@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

#20 AppTux

AppTux

    Adventurer

  • Active Members
  • PipPip
  • 130 posts

Posted 29 March 2011 - 06:56 PM

Gedzy,

I would recommend to make the window a bit less transparent: Something like a transparency of 240.
PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users