能运行
这才是精简
;#NoTrayIcon
;#RequireAdmin
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIListView.au3>
#include <GuiImageList.au3>
#include <Date.au3>
Opt("GUIOnEventMode", 1) ;开启事件模式
Opt("GUICloseOnESC", 0) ;关闭“按ESC”退出脚本的功能
Opt("WinTitleMatchMode", 2) ;匹配窗口标题的模式调整为“按子字符串”来匹配
Opt("WinDetectHiddenText", 1) ;指定让隐藏的窗口文本也能被窗口匹配函数检测.
Global $hGui = GUICreate("V2.9", 420, 416)
Global $hMyGuiList = GUICtrlCreateListView("", 10, 238, 400, 136, "", BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_DOUBLEBUFFER))
_GUICtrlListView_AddColumn($hMyGuiList, "值", 60)
_GUICtrlListView_AddColumn($hMyGuiList, "域", 300)
GUISetState()
GUISetOnEvent(-3, "_Exit")
_Key_GuiSetData()
While 1 ;主循环
Sleep(10)
WEnd
Func _Key_GuiSetData()
Global $aArrayList[5][2] = [["状态", "$iDateCalc"], ["序列号", "StringStripWS($aArray[4], 8)"], ["持有者", "$aArray[1]"], ["指纹", "StringStripWS(StringLower($aArray[6]), 8)"], ["有效期", "从 2020/1/1至 2022/3/31"]]
_GUICtrlListView_AddArray($hMyGuiList, $aArrayList)
EndFunc ;==>_Key_GuiSetData
Func _Exit()
Exit
EndFunc ;==>_Exit
Local $iDateCalc = _DateDiff('s', "1970/01/01 00:00:00", _NowCalc())
|