|
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_icon=C:\windows\System32\SHELL32.dll|-45
#PRE_UseUpx=n
#PRE_UseX64=n
#PRE_Res_requestedExecutionLevel=None
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;#include <ACN_HASH.au3>
;------------------------
Opt("TrayIconHide", 1) ;0=显示, 1=隐藏托盘图标
Opt("GUICloseOnESC", 0);防止按ESC退出
;-----------------------------------------
;防止多次打开文件
#include <Misc.au3>
$g_szVersion = "JYSP1RR2";名称
If WinExists($g_szVersion) Then
MsgBox(64, "提示", "消防信息控制单元工具,进程已运行请确认!", 1)
Exit
EndIf
AutoItWinSetTitle($g_szVersion)
_Singleton($g_szVersion)
;-----------------------------------------
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("MD5离线生成器V1.0", 610, 150, @DesktopWidth / 2 - 300, @DesktopHeight / 2 - 70)
$Label1 = GUICtrlCreateLabel("字符串", 24, 32, 100, 17)
GUICtrlSetState(-1, $GUI_DISABLE)
$Input1 = GUICtrlCreateInput("123457", 128, 32, 353, 21)
$Label2 = GUICtrlCreateLabel("MD5生成码", 24, 80, 100, 17)
GUICtrlSetState(-1, $GUI_DISABLE)
$Input2 = GUICtrlCreateInput("", 128, 72, 353, 21)
$Button1 = GUICtrlCreateButton("生成", 500, 40, 70, 50)
;GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$y1 = StringLower(_MD5(GUICtrlRead($Input1)))
GUICtrlSetData($Input2, $y1)
EndSwitch
WEnd
;------------------------
Func _MD5($string)
Static Local $hDLL = DllOpen("advapi32.dll")
Static Local $MD5_CTX = DllStructCreate("dword i[2];dword buf[4];ubyte in[64];ubyte digest[16]")
DllCall($hDLL, "none", "MD5Init", "ptr", DllStructGetPtr($MD5_CTX))
DllCall($hDLL, "none", "MD5Update", "ptr", DllStructGetPtr($MD5_CTX), "str", $string, "dword", StringLen($string))
DllCall($hDLL, "none", "MD5Final", "ptr", DllStructGetPtr($MD5_CTX))
Return Hex(DllStructGetData($MD5_CTX, "digest"))
EndFunc ;==>_MD5
;------------------------
|
|