源码-显示启动时长和关机时间,一段简单的AU3

2014年09月09日 技术资料 4137 views
源码-显示启动时长和关机时间,一段简单的AU3 第1张 
源码-显示启动时长和关机时间,一段简单的AU3 第2张 
源码下载
  1. #NoTrayIcon
  2. #Region ;**** 参数创建于 ACNWrapper_GUI ****
  3. #AutoIt3Wrapper_icon=..\soft\Desk\Backup\图标库\FlY.dll|-85
  4. #AutoIt3Wrapper_outfile=系统启动信息.exe
  5. #AutoIt3Wrapper_Res_Comment=系统启动信息
  6. #AutoIt3Wrapper_Res_Description=系统启动信息
  7. #AutoIt3Wrapper_Res_Fileversion=1.0.0.1
  8. #AutoIt3Wrapper_Res_LegalCopyright=By JFKJ
  9. #EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
  10. #include <GUIConstantsEx.au3>
  11. #include <WindowsConstants.au3>
  12. #Region ### START Koda GUI section ### Form=

  13. $milliseconds = TimerDiff(0)
  14. $years = Int($milliseconds / 31536000000)
  15. $remainMS = Mod($milliseconds, 31536000000)
  16. $days = Int($remainMS / 86400000)
  17. $remainMS = Mod($milliseconds, 86400000)
  18. $hours = Int($remainMS / 3600000)
  19. $remainMS = Mod($milliseconds, 3600000)
  20. $minutes = Int($remainMS / 60000)
  21. $remainMS = Mod($milliseconds, 60000)
  22. $seconds = Int($remainMS / 1000)
  23. $remainMS = Mod($milliseconds, 1000)

  24. ;年月日时分秒$years &"年" & $days  & "天" &  $hours& "小时" &  $minutes & "分 " &$seconds & "秒" &   Int($remainMS) & "毫秒" 
  25. $time=$minutes & "分 " &$seconds & "秒" &   Int($remainMS) & "毫秒" 

  26. $start = FileGetTime('C:\WINDOWS\system32\config\system', 0,0)
  27. $shut = FileGetTime('C:\WINDOWS\system32\config\system', 2,0)

  28. If Not @error Then
  29. EndIf

  30. $starttime=$start[0]&'年'&$start[1]&'月'&$start[2]&'日'&$start[3]&'时'&$start[4]&'分'&$start[5]&'秒'
  31. $shutdown=$shut[0]&'年'&$shut[1]&'月'&$shut[2]&'日'&$shut[3]&'时'&$shut[4]&'分'&$shut[5]&'秒'




  32. $FrmMain = GUICreate("系统启动信息", 306, 166,@DesktopWidth - 312,@DesktopHeight - 220)
  33. DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $FrmMain, "int", 500, "long", 0x00040002);slide in from right

  34. GUISetState(@SW_SHOW)
  35. $Label1 = GUICtrlCreateLabel("进入桌面时间:■ "&$starttime, 10, 32, 262, 28)
  36. GUICtrlSetColor(-1, 0x009933)
  37. $Label2 = GUICtrlCreateLabel("上次关机时间:▲ "&$shutdown, 10, 62, 262, 28)
  38. GUICtrlSetColor(-1, 0xff0066)
  39. $Label3 = GUICtrlCreateLabel("本次启动时间:◆ "&$time, 10, 92, 262, 28)
  40. GUICtrlSetColor(-1, 0xff0000)
  41. $Label4 = GUICtrlCreateLabel("By JFKJ QQ:845532699", 180, 132, 262, 28)

  42. While 1
  43.         $nMsg = GUIGetMsg()
  44.         Switch $nMsg
  45.                 Case $GUI_EVENT_CLOSE
  46.                         Exit

  47.         EndSwitch
  48. WEnd



赞赏
扫描二维码
扫描微信 845532699

温馨提示:

欢迎您访问贝壳iT官网
纯净绿色资源分享标杆


BeikeiT.Com