关于MD5转换[已解决]
本帖最后由 无名蜘蛛 于 2010-9-23 05:31 编辑搞了半天也只能让它弹出窗口,却不能让它在当前窗口显示,还有就是我想让他不显示0X才好复制#include<GUIConstants.au3>
#include <ACN_HASH.au3>
$winman = GUICreate("编码转换",450,400,-1,-1)
$md51 = GUICtrlCreateLabel("明文密码:",10,25,60,25)
$md52 = GUICtrlCreateInput("",70,20,125,25)
$md53 = GUICtrlCreateLabel("转换后",200,25,50,25)
$md54 = GUICtrlCreateInput("",240,20,125,25)
$button1 = GUICtrlCreateButton("转成MD5",370,20,80,25)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button1
$md55 = GUICtrlRead($md52)
$md56 = _MD5($md55)
MsgBox(0,"MD5",$md56)
EndSwitch
WEnd 搞定了一点GUICtrlSetData($md54,$md56)可以在框里输入了,还有一点是不知道怎么去除0x #include<GUIConstants.au3>
#include <ACN_HASH.au3>
$winman = GUICreate("编码转换", 450, 400, -1, -1)
$md51 = GUICtrlCreateLabel("明文密码:", 10, 25, 60, 25)
$md52 = GUICtrlCreateInput("", 70, 20, 125, 25)
$md53 = GUICtrlCreateLabel("转换后", 200, 25, 50, 25)
$md54 = GUICtrlCreateInput("", 240, 20, 125, 25)
$button1 = GUICtrlCreateButton("转成MD5", 370, 20, 80, 25)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button1
$md55 = GUICtrlRead($md52)
$md56 = StringReplace(_MD5($md55), '0x', '')
GUICtrlSetData($md54, $md56)
EndSwitch
WEnd 回复 3# 破帽遮颜
谢谢,关于正则表达式看来是不得不学啊。。。。。。 其实也可以这样
$md56 = StringTrimLeft(_MD5($md55),2)
回复 4# 无名蜘蛛
破帽兄似乎用的是StringReplace函数吧,貌似和正则没有关系。
页:
[1]