random667 Posted October 25, 2005 Share Posted October 25, 2005 (edited) If you would post the syntax errors, I ran it through Scite and generated no syntax or runtime errors (only the stripe issue). If anything I might have an idea of what it might be, however its doubtful.i dowloaded your script today and didnt get the errors, that script uses the ini to save the password.The images still arent working with your script.what was the reason for putting the images in seperate folders?this new one doesnt need the ini, has the xp stripe image fixed, and runs on top only while the screensaver isnt going. It also has an installer.Lock Installer.exe Edited October 25, 2005 by random667 It is really sad to see a family torn apart by something as simple as a pack of wolves. Link to comment Share on other sites More sharing options...
archrival Posted October 25, 2005 Share Posted October 25, 2005 I noticed an error in my latest posted script on line 78: If $objItem.PartOfDomain = 1 Then should be changed to: If $objItem.PartOfDomain = -1 Then Link to comment Share on other sites More sharing options...
random667 Posted October 25, 2005 Share Posted October 25, 2005 (edited) I noticed an error in my latest posted script on line 78:If $objItem.PartOfDomain = 1 Thenshould be changed to:If $objItem.PartOfDomain = -1 ThenI have made the change in my code.here is the new installer: Edited October 25, 2005 by random667 It is really sad to see a family torn apart by something as simple as a pack of wolves. Link to comment Share on other sites More sharing options...
archrival Posted October 25, 2005 Share Posted October 25, 2005 (edited) I have made the change in my code.here is the new installer:I noticed some weird things with your script, if I click on the background, the foreground window disappears and because Alt-Tab is disabled, I could not figure out a way to bring it back to the front. I had to kill the task with task manager. Also, I had certain hotkeys only active in certain portions of the code for a reason, using enter to input the password in your script will not work with the hotkey set at the beginning of the script, I also only have Ctrl-Alt-Insert active in the _Locked() function to emulate the windows behavior. It does need to be moved from line 99 to 111 in my script to function like the Windows dialog. I also did not move some things into functions because they will never be run more than once (user info, initial background GUI creation, or the information about the pictures). I also modified the code to use the actual icon file msgina.dll. expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 (beta) ; Language: English ; Platform: WinXP ; Author: Cybie, ArchRival ; ; Script Function: ; Fake the "computer locked" dialog so that AutoIt may run in the background. ; ; ---------------------------------------------------------------------------- #include <GuiConstants.au3> #NoTrayIcon AutoItSetOption("RunErrorsFatal", 0) AutoItSetOption("GUICloseOnESC", 0) HotKeySet("{ESC}", "_Locked") HotKeySet("!{TAB}", "_Nothing") HotKeySet('!{F4}', "_Nothing") Dim $unlockcomp, $unlockcompdomain, $complock, $logondomain, $user, $password, $domain, $optionsbutton If @OSVersion = "WIN_XP" Then If @DesktopDepth > 8 Then $WinImage = @TempDir & "\" & "XP_High.bmp" FileInstall("XP_High.bmp", $WinImage, 1) $WinStripe = @TempDir & "\" & "XP_Liner_High.bmp" FileInstall("XP_Liner_High.bmp", $WinStripe, 1) Else $WinImage = @TempDir & "\" & "XP_Low.bmp" FileInstall("XP_Low.bmp", $WinImage, 1) $WinStripe = @TempDir & "\" & "XP_Liner_Low.bmp" FileInstall("XP_Liner_Low.bmp", $WinStripe, 1) EndIf $StripeStart = 72 $lockicon = 6 ElseIf @OSVersion = "WIN_2000" Then If @DesktopDepth > 8 Then $WinImage = @TempDir & "\" & "2K_High.bmp" FileInstall("2K_High.bmp", $WinImage, 1) $WinStripe = @TempDir & "\" & "2K_Liner_High.bmp" FileInstall("2K_Liner_High.bmp", $WinStripe, 1) Else $WinImage = @TempDir & "\" & "2K_Low.bmp" FileInstall("2K_Low.bmp", $WinImage, 1) $WinStripe = @TempDir & "\" & "2K_Liner_Low.bmp" FileInstall("2K_Liner_Low.bmp", $WinStripe, 1) EndIf $StripeStart = 76 $lockicon = 5 EndIf $objWshNet = ObjCreate("WScript.Network") $objUser = ObjGet("WinNT://" & @LogonDomain & "/" & @UserName & ",user") If $objUser.FullName <> "" Then $fullname = " (" & $objUser.FullName & ")" Else $fullname = "" EndIf $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") $colItems = $objWMIService.ExecQuery ("SELECT PartOfDomain FROM Win32_ComputerSystem", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems If $objItem.PartOfDomain = -1 Then $isdomain = 1 Else $isdomain = 0 EndIf Next Else $isdomain = 0 EndIf $username = @LogonDomain & "\" & @UserName & $fullname GUICreate("", @DesktopWidth, @DesktopHeight, "", "", 0x80000000 + $WS_EX_TOPMOST) $bgcolor = RegRead("HKEY_CURRENT_USER\Control Panel\Colors", "Background") $colors = StringSplit($bgcolor, " ") $hexbgcolor = "0x" & Hex($colors[1], 2) & Hex($colors[2], 2) & Hex($colors[3], 2) GUISetBkColor($hexbgcolor) GUISetState() _Locked() Func _Locked() If $unlockcomp <> "" Then GUIDelete($unlockcomp) EndIf If $unlockcompdomain <> "" Then GUIDelete($unlockcompdomain) EndIf If $complock <> "" Then GUIDelete($complock) EndIf If Not $isdomain Then _Login() EndIf HotKeySet("^!{INS}", "_Login") $complock = GUICreate("Computer Locked", 413, 218, -1, (@DesktopHeight / 2) - (@DesktopHeight / 4.25), 0x00000000 + $WS_EX_TOPMOST) GUICtrlCreatePic($WinImage, 0, 0, 0, 0) GUICtrlCreatePic($WinStripe, 0, $StripeStart, 0, 0) GUICtrlCreateIcon("msgina.dll", $lockicon, 10, 82) GUICtrlCreateLabel("This computer is in use and has been locked.", 52, 85, 325, 20) GUICtrlCreateLabel("Only " & $username & " or an administrator can unlock this computer.", 52, 105, 345, 40) GUICtrlCreateLabel("Press Ctrl-Alt-Del to unlock this computer.", 52, 160, 325, 20) GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Send("") WEnd EndFunc Func _Login() If $complock <> "" Then GUIDelete($complock) EndIf If $unlockcompdomain <> "" Then GUIDelete($unlockcompdomain) EndIf HotKeySet("^!{INS}") $unlockcomp = GUICreate("Unlock Computer", 413, 274, -1, (@DesktopHeight / 2) - (@DesktopHeight / 4.25), 0x00000000 + $WS_EX_TOPMOST) GUICtrlCreatePic($WinImage, 0, 0, 0, 0) GUICtrlCreatePic($WinStripe, 0, $StripeStart, 0, 0) GUICtrlCreateIcon("msgina.dll", $lockicon, 10, 82) GUICtrlCreateLabel("This computer is in use and has been locked.", 52, 85, 325, 20) GUICtrlCreateLabel("Only " & $username & " or an administrator can unlock this computer.", 52, 105, 345, 40) GUICtrlCreateLabel("User name:", 52, 153) GUICtrlCreateLabel("Password:", 52, 181) $user = GUICtrlCreateInput(@UserName, 119, 150, 185) $password = GUICtrlCreateInput("", 119, 178, 185, -1, $ES_PASSWORD) If $isdomain Then $okbutton = GUICtrlCreateButton("OK", 146, 209, 75, 23) $cancelbutton = GUICtrlCreateButton("Cancel", 227, 209, 75, 23) $optionsbutton = GUICtrlCreateButton("Options >>", 308, 209, 75, 23) Else $okbutton = GUICtrlCreateButton("OK", 227, 209, 75, 23) $cancelbutton = GUICtrlCreateButton("Cancel", 308, 209, 75, 23) GUICtrlSetState($cancelbutton, $GUI_DISABLE) EndIf GUICtrlSetState($password, $GUI_FOCUS) HotKeySet("{Enter}", "_Auth") GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() If $optionsbutton <> "" Then Select Case $msg = $okbutton $logondomain = @LogonDomain _Auth() Case $msg = $cancelbutton _Locked() Case $msg = $optionsbutton _LoginDomain() EndSelect Else Select Case $msg = $okbutton $logondomain = @LogonDomain _Auth() Case $msg = $cancelbutton _Locked() EndSelect EndIf WEnd EndFunc Func _LoginDomain() GUIDelete($unlockcomp) HotKeySet("^!{INS}") $unlockcompdomain = GUICreate("Unlock Computer", 413, 300, -1, (@DesktopHeight / 2) - (@DesktopHeight / 4.25), 0x00000000 + $WS_EX_TOPMOST) GUICtrlCreatePic($WinImage, 0, 0, 0, 0) GUICtrlCreatePic($WinStripe, 0, $StripeStart, 0, 0) GUICtrlCreateIcon("msgina.dll", $lockicon, 10, 82) GUICtrlCreateLabel("This computer is in use and has been locked.", 52, 85, 325, 20) GUICtrlCreateLabel("Only " & $username & " or an administrator can unlock this computer.", 52, 105, 345, 40) GUICtrlCreateLabel("User name:", 52, 153) GUICtrlCreateLabel("Password:", 52, 181) GUICtrlCreateLabel("Log on to:", 52, 209) $user = GUICtrlCreateInput(@UserName, 119, 148, 185) $password = GUICtrlCreateInput("", 119, 176, 185, -1, $ES_PASSWORD) $domain = GUICtrlCreateCombo(@LogonDomain, 119, 204, 185, -1, $CBS_DROPDOWNLIST) GUICtrlSetData($domain, @ComputerName & " (this computer)") $okbutton = GUICtrlCreateButton("OK", 146, 236, 75, 23) $cancelbutton = GUICtrlCreateButton("Cancel", 227, 236, 75, 23) $optionsbutton = GUICtrlCreateButton("Options <<", 308, 236, 75, 23) GUICtrlSetState($password, $GUI_FOCUS) HotKeySet("{Enter}", "_Auth") GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $okbutton _Auth() Case $msg = $cancelbutton _Locked() Case $msg = $optionsbutton _Login() EndSelect WEnd EndFunc Func _Auth() If $unlockcompdomain <> "" Then If $logondomain = "" Then $readdomain = GUICtrlRead($domain) $logondomain = StringStripWS(StringTrimRight($readdomain, StringLen($readdomain) - StringInStr($readdomain, " ")), 7) EndIf EndIf If $unlockcomp <> "" Then If $logondomain = "" Then $logondomain = @LogonDomain EndIf EndIf HotKeySet("{Enter}") RunAsSet(GUICtrlRead($user), $logondomain, GUICtrlRead($password), 0) Run(@ComSpec & " /c dir C:\", @WindowsDir, @SW_HIDE) If @error Then RunAsSet() MsgBox(16, "Computer Locked.", "The password is incorrect. Please retype your password. Letters in passwords must be typed using the correct case.") GUICtrlSetData($password, "") Else RunAsSet() _Cleanup() EndIf HotKeySet("{Enter}", "_Auth") $logondomain = "" EndFunc Func _Nothing() Sleep(0) EndFunc Func _Cleanup() FileDelete($WinImage) FileDelete($WinStripe) Exit EndFunc Edited October 25, 2005 by archrival Link to comment Share on other sites More sharing options...
random667 Posted October 25, 2005 Share Posted October 25, 2005 (edited) I noticed some weird things with your script, if I click on the background, the foreground window disappears and because Alt-Tab is disabled, I could not figure out a way to bring it back to the front. I had to kill the task with task manager.With your posted script if i click on the background the login box drops under, your script also does not have the screensaver detect code.On my pc(XP) with my script if i click on the background the login box stays on top.Maybe you are running it on Windows 2k? i dont have a 2K machine to try it on.also the task manager should have been disabled in the script.using enter to input the password in your script will not work with the hotkey set at the beginning of the scriptWorks fine for me.The hotkey is always HotKeySet("{Enter}", "_Auth"),If you declare a hotkey it stays declared unless you redeclare it for something else later in the script.The _ScreenSaverCheck is the only thing that keeps the loginbox on top, maybe its not called in the 2k or domain login?This script works perfect for me On Xp. if you wanna keep changing it go ahead, i'm out!i uploaded a new installer that includes the Lock.lnk in with the files so the installer script can be recomplied. Edited October 25, 2005 by random667 It is really sad to see a family torn apart by something as simple as a pack of wolves. Link to comment Share on other sites More sharing options...
archrival Posted October 25, 2005 Share Posted October 25, 2005 (edited) The hotkey is always HotKeySet("{Enter}", "_Auth"),If you declare a hotkey it stays declared unless you redeclare it for something else later in the script.What happens when you enter an incorrect password and want to hit enter again to skip past the error message? The error message continually pops up. I just see no reason to move it, understand why I have it where I do beforehand. Edited October 26, 2005 by archrival Link to comment Share on other sites More sharing options...
archrival Posted October 25, 2005 Share Posted October 25, 2005 (edited) OK, here's the latest version. I wrote a little VB program to disable the shortcuts, I intentionally left CTRL-ALT-Delete enabled for obvious reasons. The only way to disable this program is to use ctrl-alt-delete, which if that's disabled and you forget the password, good luck. You could always put a back door in to the program though. Let me know if you have any issues with it. FakeLock.zip Edited October 25, 2005 by archrival Link to comment Share on other sites More sharing options...
random667 Posted October 26, 2005 Share Posted October 26, 2005 (edited) OK, here's the latest version. I wrote a little VB program to disable the shortcuts, I intentionally left CTRL-ALT-Delete enabled for obvious reasons. The only way to disable this program is to use ctrl-alt-delete, which if that's disabled and you forget the password, good luck. You could always put a back door in to the program though.Let me know if you have any issues with it.1:With this script when you enter the wrong password, the error box pops up under the login box.How are you gonna make the login box stay on top of the background, make the error box pop up on top of the login box, and keep it all under the screen saver? (i would be pissed if i locked up my pc with this, and got up the next morning to find the image of this login burned into my plasma screen).2:If you use code to detect when the screensaver comes on, you could have this script set to run automatically when the screen saver comes on, like the windows login can do.3:Why do you not disable the Ctrl+Alt+Del? Even my wife(computer illiterate) knows to kill things with the Ctrl+Alt+Del. if you forget the password you are an idiot that should be locked outta his own machine, you cant get around the original windows login with Ctrl+Alt+Del.I know i dont want anyone using my pc without my permission, and there have been people who have tried!Instead of making a fake lock, Maybe it would be better to just make one that will let your scripts run while actually locking your computer?4:Is there not a way to block keypresses in autoit without having to make an exe with VB?5:Why are you doing:HotKeySet("{ESC}", "_Locked") instead of: [Code]HotKeySet("{ESC}", "_Nothing")?6:Also you might want to join each main image with the stripe that goes with it, into one image for each OS/Resolution instead of two, to cut down on bloat.7:When the windows login kicks in after the screensaver has been running, it shows your wallpaper for the background instead of a solid screen.That is all.... Edited October 26, 2005 by random667 It is really sad to see a family torn apart by something as simple as a pack of wolves. Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted October 26, 2005 Share Posted October 26, 2005 I guess it really depends on what you are going to use this app for. I only use it right now to lock the screen really quick while I'm away, and I also intend to have it installed on a small standalone machine that just auto-sends PDFs via email (don't want someone to close the script). I don't see a reason to disallow Ctrl+Alt+Del, however, just seeing the logon box should keep people away from it (whether I'm grabbing a drink or its in a back room). Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
random667 Posted October 26, 2005 Share Posted October 26, 2005 I don't see a reason to disallow Ctrl+Alt+Del, however, just seeing the logon box should keep people away from it (whether I'm grabbing a drink or its in a back room).Seeing the logon box may deter some people, but it only takes one idiot messing around on your computer to screw it up. It is really sad to see a family torn apart by something as simple as a pack of wolves. Link to comment Share on other sites More sharing options...
random667 Posted October 26, 2005 Share Posted October 26, 2005 (edited) Here is a simplified xp only version.maybe someone wants to do one for 2k?I combined both the high xp images into one image.Background is now the desktop wallpaper.http://www.autoitscript.com/forum/index.ph...ic=10083&st=75# Edited October 28, 2005 by random667 It is really sad to see a family torn apart by something as simple as a pack of wolves. Link to comment Share on other sites More sharing options...
archrival Posted October 26, 2005 Share Posted October 26, 2005 1:With this script when you enter the wrong password, the error box pops up under the login box.How are you gonna make the login box stay on top of the background, make the error box pop up on top of the login box, and keep it all under the screen saver? (i would be pissed if i locked up my pc with this, and got up the next morning to find the image of this login burned into my plasma screen).Yes, I noticed this too, this was my quick attempt to fix the always on top issue before baseball started, I guess I failed.3:Why do you not disable the Ctrl+Alt+Del? Even my wife(computer illiterate) knows to kill things with the Ctrl+Alt+Del. if you forget the password you are an idiot that should be locked outta his own machine, you cant get around the original windows login with Ctrl+Alt+Del.I know i dont want anyone using my pc without my permission, and there have been people who have tried!Instead of making a fake lock, Maybe it would be better to just make one that will let your scripts run while actually locking your computer?I'm not really using this to lock the machine, it's just a fake lock, remember? It would be easy enough to kill task manager the second it appears though in the script.4:Is there not a way to block keypresses in autoit without having to make an exe with VB?Don't know, you tell me, this works though and it also is something I wanted for something else anyway.5:Why are you doing:HotKeySet("{ESC}", "_Locked") instead of: [Code]HotKeySet("{ESC}", "_Nothing")?What happens when you hit escape on a domain machine after you've hit ctrl-alt-delete to login? It takes you back to the "Computer Locked" screen, which is what I wanted. I should probably move the hotkey definition into _Login() and _LoginDomain().6:Also you might want to join each main image with the stripe that goes with it, into one image for each OS/Resolution instead of two, to cut down on bloat.It's not like autoit is built for speed, nor is the speed of this script crucial and it didn't bother me to have 8 different images.7:When the windows login kicks in after the screensaver has been running, it shows your wallpaper for the background instead of a solid screen.That is all....It probably does, I never let the screen saver kick in. Link to comment Share on other sites More sharing options...
archrival Posted October 26, 2005 Share Posted October 26, 2005 I guess it really depends on what you are going to use this app for. I only use it right now to lock the screen really quick while I'm away, and I also intend to have it installed on a small standalone machine that just auto-sends PDFs via email (don't want someone to close the script).I don't see a reason to disallow Ctrl+Alt+Del, however, just seeing the logon box should keep people away from it (whether I'm grabbing a drink or its in a back room).Why don't you set up your autoit script to run as a service so you don't even need the machine logged in for it to run? Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted October 26, 2005 Share Posted October 26, 2005 I only am using this right now when I want to lock my computer, but allow a script to continue running. I rarely have scripts running non-stop on my machine (maybe the Internet Radio), however, none those that do run most of the time are not mission-critical. Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
random667 Posted October 27, 2005 Share Posted October 27, 2005 (edited) I only am using this right now when I want to lock my computer, but allow a script to continue running. I rarely have scripts running non-stop on my machine (maybe the Internet Radio), however, none those that do run most of the time are not mission-critical.I have multiple pcs running pc anywhere, if the original windows login activates, the pcanywhere service becomes inactive.I need to keep these machines password protected, but still be able to access them through pcanywhere.Here is a simple single user xp only version, that you could set to autorun at windows startup.This one will continue to run, hidden in the background after you login, if the screensaver is detected the login dialog is reactivated.I have explorer and task manager disabled while login box is active, Untill some knows how to disable the windows key and hide this lock process from the taskmanager with Autoit.For me it would be useless otherwise.I have also set F10 as a hotkey to quick run the lock. Lock.Au3:expandcollapse popup; ---------------------------------------------------------------------------- ; AutoIt Version: 3.1.1 (beta) ; Language: English ; Platform: WinXP ; Loginor: Cybie, ArchRival, MSLx Fanboy, Random667 ; Script Function: ; Fake the "computer locked" dialog so that AutoIt may run in the background. ; ---------------------------------------------------------------------------- #include <GuiConstants.au3> #NoTrayIcon AutoItSetOption("RunErrorsFatal", 0) AutoItSetOption("GUICloseOnESC", 0) Dim $user, $password, $WinImage, $username, $okbutton, $bgImage, $GUI_ON $ScreenSaverDetected = 0 Dim $SCR_PATH = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "SCRNSAVE.EXE") _GUI() While 1 _ScreenSaverCheck() $msg = GUIGetMsg() Select Case $msg = $okbutton _Login() Case $ScreenSaverDetected = 0 And $GUI_ON = 1 WinSetOnTop("Unlock Computer", "", 1) ProcessClose("Explorer.exe") ProcessClose("Taskmgr.exe") Case $ScreenSaverDetected = 1 And $GUI_ON = 1 WinSetOnTop("Unlock Computer", "", 0) Case $ScreenSaverDetected = 1 And $GUI_ON = 0 _GUI() WinSetOnTop("Unlock Computer", "", 0) EndSelect WEnd Func _GUI() $GUI_ON = 1 HotKeySet("{ESC}", "_Nothing") HotKeySet("!{TAB}", "_Nothing") HotKeySet("!{F4}", "_Nothing") HotKeySet("^!{INS}", "_Nothing") HotKeySet("{Enter}", "_Login") HotKeySet("^", "_Nothing") HotKeySet("!", "_Nothing") HotKeySet("{F10}") $username = @UserName $WinImage = @TempDir & "\" & "XP_High.bmp" FileInstall("XP_High.bmp", $WinImage, 1) GUICreate("BG", @DesktopWidth, @DesktopHeight, "", "", 0x80000000 + $WS_EX_TOPMOST) $bgImage = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "ConvertedWallpaper") GUICtrlCreatePic($bgImage, 0, 0, @DesktopWidth, @DesktopHeight) GUISetState() GUICreate("Unlock Computer", 413, 274, -1, (@DesktopHeight / 2) - (@DesktopHeight / 4.25), 0x00000000 + $WS_EX_TOPMOST) GUICtrlCreatePic($WinImage, 0, 0, 0, 0) GUICtrlCreateIcon("msgina.dll", 6, 10, 82) GUICtrlCreateLabel("This computer is in use and has been locked.", 52, 85, 325, 20) GUICtrlCreateLabel("Only " & $username & " or an administrator can unlock this computer.", 52, 105, 345, 40) GUICtrlCreateLabel("User name:", 52, 153) GUICtrlCreateLabel("Password:", 52, 181) $user = GUICtrlCreateInput(@UserName, 119, 150, 185) $password = GUICtrlCreateInput("", 119, 178, 185, -1, $ES_PASSWORD) $okbutton = GUICtrlCreateButton("OK", 227, 209, 75, 23) $cancelbutton = GUICtrlCreateButton("Cancel", 308, 209, 75, 23) GUICtrlSetState($cancelbutton, $GUI_DISABLE) GUICtrlSetState($password, $GUI_FOCUS) GUISetState() $msg = 0 EndFunc;==>_GUI Func _Login() RunAsSet(GUICtrlRead($user), @LogonDomain, GUICtrlRead($password), 0) Run(@ComSpec & " /c dir C:\", @WindowsDir, @SW_HIDE) If @error Then WinSetOnTop("Unlock Computer", "", 0) MsgBox(16, "Computer Locked.", "The password is incorrect. Please retype your password. Letters in passwords must be typed using the correct case.", 1) HotKeySet("{Enter}") GUICtrlSetData($password, "") GUICtrlSetState($password, $GUI_FOCUS) WinSetOnTop("Computer Locked.", "", 1) HotKeySet("{Enter}", "_Login") Else RunAsSet() FileDelete($WinImage) Run("Explorer.exe") $GUI_ON = 0 GUIDelete("Unlock Computer") GUIDelete("BG") HotKeySet("{ESC}") HotKeySet("!{TAB}") HotKeySet("!{F4}") HotKeySet("^!{INS}") HotKeySet("{Enter}") HotKeySet("^") HotKeySet("!") HotKeySet("{F10}","_QuickLock") EndIf EndFunc;==>_Login Func _Nothing() Sleep(0) EndFunc;==>_Nothing Func _ScreenSaverCheck() $list = ProcessList() $x = 0 $y = 0 For $i = 1 To $list[0][0] $Detected = StringInStr($list[$i][0], ".scr") $x = $x + $Detected If $x > 0 Then $y = $y + 1 EndIf Next If $y = 1 And $x > 0 And Not WinExists("Display Properties") Then $ScreenSaverDetected = 1 Else $ScreenSaverDetected = 0 EndIf EndFunc;==>_ScreenSaverCheck Func _QuickLock() _GUI() WinSetOnTop("Unlock Computer", "", 1) EndFuncThe .Au3:Lock.au3The new Image: Edited October 27, 2005 by random667 It is really sad to see a family torn apart by something as simple as a pack of wolves. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now