前面的“sfsdfdffddddf”有嘛用呢?先按你说的“假如绘制一个gui图形,在输入框输入15234123则显1751,输入15234124则显示1752,假设文本路径为d:\sy.txt ”来写代码,还有啥问题回复我。
txt中写:[15234123]
pwd=1751
[15234124]
pwd=1752
[15234125]
pwd=1753
[15234126]
pwd=1754
代码:(还可以写成INPUTBOX形式,需要的话回复我)#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 354, 94, 192, 124)
$Label1 = GUICtrlCreateLabel("请输入帐号:", 8, 8, 92, 17)
$Input1 = GUICtrlCreateInput("", 104, 8, 241, 21)
$Label2 = GUICtrlCreateLabel("你的密码是:", 8, 32, 92, 17)
$Input2 = GUICtrlCreateInput("输入后才可以获取哦!", 104, 32, 241, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
$Button1 = GUICtrlCreateButton("获取", 256, 56, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Input2,IniRead("d:\sy.txt",GuiCtrlRead($Input1),"pwd","输入错误"))
EndSwitch
WEnd
|