AM电脑吧 - Win10精简版系统_Win11精简版_Win7旗舰版

Yes
查看: 4974|回复: 2
收起左侧

[其它] AU3锁屏源代码

[复制链接]
ampc830058

签到天数: 1 天

[LV.1]一个记事本

id AU32015 发表于 2015-07-25 17:15:48
锁屏源码
  1. ; ----------------------------------------------------------------------------
  2. ;
  3. ; AutoIt Version: 3.1.1 (beta)
  4. ; Language:       English
  5. ; Platform:       WinXP
  6. ; Author:         Cybie
  7. ;
  8. ; Script Function:
  9. ;    Fake the "computer locked" dialog so that AutoIt may run in the background.
  10. ;
  11. ; ----------------------------------------------------------------------------
  12. #include <GuiConstants.au3>
  13. HotKeySet("{F2}","KillSwitch")

  14. $LockImage = @TempDir & "/" & "locked.jpg"
  15. FileInstall("locked.jpg", $LockImage, 1)
  16. $SecurityImage = @TempDir & "/" & "security.jpg"
  17. FileInstall("security.gif", $SecurityImage, 1)

  18. $username = "MKTNG\yourname (Your Name)"

  19. ; GUI looks like background.
  20. GuiCreate("x", @DesktopWidth, @DesktopHeight, -1, -1, 0x80000000)
  21. GUISetBkColor (0x6E8ADE)
  22. GuiSetState()

  23. GUICreate("Computer Locked", 400, 200, -1, -1, 0x00000000)
  24. GUISetBkColor (0xE0E0C0)
  25. GUICtrlCreatePic ($LockImage, 0, 0, 400, 75)
  26. GUICtrlCreatePic ($SecurityImage, 10, 85, 32, 25)
  27. GUICtrlCreateLabel("This computer is in use and has been locked.",52,85,325,20)
  28. GUICtrlCreateLabel("Only " & $username & " or an administrator can unlock this computer.",52,105,325,40)
  29. GUICtrlCreateLabel("Press Ctrl-Alt-Del to unlock this computer.",52,145,325,20)
  30. GUISetState()

  31. $msg = 0
  32. While $msg <> $GUI_EVENT_CLOSE
  33.     $msg = GUIGetMsg()
  34. ;Keeps the computer from actually locking due to inactivity.
  35.     $RandomMoveX = Random (1, @DesktopWidth)
  36.     MouseMove ($RandomMoveX, @DesktopHeight)
  37.     $RandomTime = Random (5000, 10000)
  38.     Sleep($RandomTime)
  39.     WinActivate("x")
  40.     WinActivate("Computer Locked")
  41. Wend

  42. ;FUNCTIONS
  43. ;---------
  44. Func KillSwitch()
  45.     Exit 0
  46. EndFunc
复制代码


评分

参与人数 1硬盘 +6 收起 理由
ampc84 ②號 + 6 谢谢分享`

本文地址: https://www.ampc8.com/thread-19525-1-1.html
上一篇:微软终于露底了 win10不存在正式版
下一篇:Win10和win7对比评测:实际只是斯巴达占了点优势
回复

举报

ampc810379

签到天数: 3963 天

[LV.Master]顶级配置

id chzj589 发表于 2015-07-28 16:38:05
把任务栏也锁住就更好了
回复

举报

ampc823649

签到天数: 3 天

[LV.2]二兆带宽

id zpmc123 发表于 2015-07-26 11:42:29 手机发帖
先收藏看看功能怎么样
回复

举报

您需要登录后才可以回帖 登录 | 验证注册

Powered by AMpc8.Com (晋ICP备13003365号ghs 晋公网安备 14090202000112号 |GMT+8, 2024/5/13 17:40 |
快速回复 返回顶部 返回列表